-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Open Interpreter can't identify API key in .zshrc file #1328
Comments
Hi, did you try to put it this way in your
|
If you run interpreter with --api_key sk-your-key |
@kasjfksj did you source the file after exporting?? |
I am having the same issue, every other tool that I use the key works fine. Seems to be related to .zshrc |
@danielbowne did you try @Notnaton's suggestion? |
Of course, I read the docs :) I know how to make the tool work, I am suggesting the tool to work as expected. |
@danielbowne Then share more information to allow us to assist you. OI reads from my zshrc without issue |
@danielbowne |
Is your feature request related to a problem? Please describe.
I'm running the command interpreter --os and type in a question regarding time in Berkeley. Then, I got this error
**openai.openaiError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
There might be an issue with your API key(s).
To reset your API key (we'll use OPENAI_API_KEY for this example, but you may need to reset your ANTHROPIC_API_KEY, HUGGINGFACE_API_KEY, etc):
Mac/Linux: 'export OPENAI_API_KEY=your-key-here'. Update your ~/.zshrc on MacOS or ~/.bashrc on Linux with the new key if it has already been persisted there.,
Windows: 'setx OPENAI_API_KEY your-key-here' then restart terminal.**
Before that, I add the api key to .zshrc file and it looks like this:
export OPENAI_API_KEY=* **
Describe the solution you'd like
Because I add api key to .zshrc, it should work by now according to the error.
Describe alternatives you've considered
I've tried to use several User API keys and Project API keys. None of them work. I also use sudo to run the command. It also doesn't work. I really don't know why this happens.
Additional context
No response
The text was updated successfully, but these errors were encountered: