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

Fix tip for API Keys #1338

Open
JSee98 opened this issue Jul 14, 2024 · 1 comment · Fixed by #1344
Open

Fix tip for API Keys #1338

JSee98 opened this issue Jul 14, 2024 · 1 comment · Fixed by #1344

Comments

@JSee98
Copy link
Contributor

JSee98 commented Jul 14, 2024

Describe the bug

The tip to save API key for future use-cases by exporting to bash/zsh configs shows a redundant next line character "\n".

This can confuse non-programmers when they directly copy-paste the command.

Exact response on terminal:

Tip: To save this key for later, run one of the following and then restart your 
terminal.                                                                       
MacOS: echo '\nexport OPENAI_API_KEY=your_api_key' >> ~/.zshrc                  
Linux: echo '\nexport OPENAI_API_KEY=your_api_key' >> ~/.bashrc                 
Windows: setx OPENAI_API_KEY your_api_key

Reproduce

Run interpreter for without OpenAI key set in the environment

Expected behavior

Tip: To save this key for later, run one of the following and then restart your 
terminal.                                                                       
MacOS: echo 'export OPENAI_API_KEY=your_api_key' >> ~/.zshrc                  
Linux: echo 'export OPENAI_API_KEY=your_api_key' >> ~/.bashrc                 
Windows: setx OPENAI_API_KEY your_api_key

Screenshots

No response

Open Interpreter version

0.3.4

Python version

3.10.12

Operating System name and version

Ubuntu 22.04

Additional context

No response

@danielbowne
Copy link

danielbowne commented Aug 20, 2024

Also "Linux: echo 'export OPENAI_API_KEY=your_api_key' >> ~/.bashrc " could be misleading. Should say :

MacOS/Linux: 

- zshrc: echo 'export OPENAI_API_KEY=your_api_key' >> ~/.zshrc                  
- Bash: echo 'export OPENAI_API_KEY=your_api_key' >> ~/.bashrc   

Windows: setx OPENAI_API_KEY your_api_key

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

Successfully merging a pull request may close this issue.

2 participants