open-interpreter icon indicating copy to clipboard operation
open-interpreter copied to clipboard

Fix tip for API Keys

Open JSee98 opened this issue 1 year ago • 1 comments

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

JSee98 avatar Jul 14 '24 18:07 JSee98

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

danielbowne avatar Aug 20 '24 11:08 danielbowne