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

OpenAI() key default to "OPENAI_API_KEY" #51

Open
iuiu34 opened this issue Dec 13, 2023 · 1 comment
Open

OpenAI() key default to "OPENAI_API_KEY" #51

iuiu34 opened this issue Dec 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@iuiu34
Copy link

iuiu34 commented Dec 13, 2023

Describe the issue:

OpenAI() has arg api_key.
Why this does not default to os.environ['OPENAI_API_KEY']?

Expected behavior

OpenAI()
is callable without args

Reproduce the code example:

`OpenAI()`

Error message:

No response

Context for the issue:

No response

@iuiu34 iuiu34 added the bug Something isn't working label Dec 13, 2023
@stoyan-stoyanov
Copy link
Owner

hi @iuiu34 thanks for bringing this up. I also had some feedback that loading API keys by default can create some issues like using the wrong API key. Another concern I have is that if one model provider does that by default and the rest don't this creates inconsistencies in the API.
I will keep this open until I get some more user feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants