Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace AZURE_OPENAI_KEY with AZURE_OPENAI_API_KEY (consistent naming of API keys) #540

Closed
bmerkle opened this issue Jul 29, 2024 · 2 comments
Assignees

Comments

@bmerkle
Copy link
Contributor

bmerkle commented Jul 29, 2024

Describe the bug
Currently there are two different naming conventions for env variables for API key:
one with API and one without API in the name
example:
OPENAI_API_KEY: This is the authorization key for using the service for non-Azure OpenAI endpoints
AZURE_OPENAI_KEY: This is the authorization key for using that service (in Azure OpenAI)

I would like to rename the env variable AZURE_OPENAI_KEY into AZURE_OPENAI_API_KEY to make in more consistent regarding the naming of API keys. It should always include API_KEY if it is an API_KEY.

There are also currently already some places where the renaming happened e.g. in commit #4783eb8 this has been fixed for [04-prompt-engineering-fundamentals/python/aoai-assignment.ipynb]
Also the GOOGLE_DEVELOPER_API_KEY follows this naming convention.
The only exception is AZURE_OPENAI_KEY, which should be AZURE_OPENAI_API_KEY in my opinion.

My question:

  • should we use a consistent naming for API key variables ? (I think yes ;-) )
  • how can fix this this ? (each sample step by step, or a large change over all projects)

I would contribute a patch for all projects or several patches for each sample step by step.

To Reproduce
Different naming for API key env variables.
For OPENAI we use API_KEY in the name
For AZURE_OPENAI we only use KEY in the name
This is somewhat inconsistent

Expected behavior
Use a consistent name for all API_KEY:
instead of AZURE_OPENAI_KEY better use AZURE_OPENAI_API_KEY

Copy link

👋 Thanks for contributing @bmerkle! We will review the issue and get back to you soon.

@koreyspace
Copy link
Collaborator

Hey @bmerkle , yes, I agree. Consistent naming would improve the learner experience and should include API_KEY

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants