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

Open Interpreter can't identify API key in .zshrc file #1328

Open
aldkfjwe opened this issue Jun 26, 2024 · 0 comments
Open

Open Interpreter can't identify API key in .zshrc file #1328

aldkfjwe opened this issue Jun 26, 2024 · 0 comments

Comments

@aldkfjwe
Copy link

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

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

No branches or pull requests

1 participant