j178 / chatgpt

An elegant interactive CLI for ChatGPT
694 stars 52 forks source link

How to use first time as error:$ chatgpt panic: Missing API KEY #35

Closed abdulbadii closed 1 year ago

abdulbadii commented 1 year ago

How do we use for first time after got the key ?

$ chatgpt
panic: Missing API KEY

goroutine 1 [running]:
main.main()
    /home/runner/work/chatgpt/chatgpt/main.go:39 +0x1be
j178 commented 1 year ago

Normally, you need to set the OPENAI_API_KEY environment variable or specify the api_key in the ~/.config/chatgpt/config.json file before executing chatgpt. However, your panic message seems a little strange since no error message in this project matches Missing API KEY. Are you certain that you are running the correct version of this project?