-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
awesome_chat.py returns error about openai api key #63
Comments
@HaroldMitts Sorry for the trouble. Let me try to solve it for you. First, let me know if your OpenAI Key starts with 'sk-'? Also, what is the commit id of the JARVIS you are using? |
maybe you need to modify lite.yaml instead. when running |
@tricktreat The OpenAI API key does conform with the requirements and begins with sk- also, how do I check the commit ID? @zzfoo I did try adding both keys to the lite.yaml and it is returning the same error In general, I should be able to modify either yaml file key values, save the file(s), then rerun the commands to use either the browser or cli without restarting anything else, right? |
@HaroldMitts no, every time you change config.yaml, you need to run |
Have I setup my You can also see in the screenshot the error message
I tried downloading Jarvis again using the code as of April 6th, but getting the same issues regardless if I hard-code my OpenAI API key into the lite and config yaml files, or use the environment variables. Anytime I make changes in these yaml files, I run the awesome_chat script again. |
This is too strange. In fact, this error is only reported if the code is satisfied: if not config["openai"]["key"].startswith("sk-") and config["openai"]["key"]!="gradio":
raise ValueError("Incrorrect OpenAI key. Please check your config.yaml file.") |
I added the double quotes around the hard-coded OpenAI API key and also around the Huggingface token, and it seems to have gotten past this issue. I don't know if it is true, but if true, it seems like should be in the documentation. |
I have quadruple checked my openai api key is correct. I copied and pasted it to avoid typo, I even generated a new key after many attempts/fails. However, no matter what key I generate and write to config.yaml, when I run awesome_chat.py it insists that I have an incorrect openai key.
I also tried running npm run dev and the browser opens and I see the HuggingGPT page and text box, but anytime I submit any prompt, system returns "Something seems seems wrong". Interestingly, localhost is opened to port 9999 when running npm run dev, but in config.yaml it has localhost port set to 8003.
What is it I am doing wrong? I feel like I am so close, but so far. :)
The text was updated successfully, but these errors were encountered: