Giter Club home page Giter Club logo

Comments (8)

tricktreat avatar tricktreat commented on May 22, 2024

@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?

from jarvis.

zzfoo avatar zzfoo commented on May 22, 2024

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. :)

maybe you need to modify lite.yaml instead. when running python awesome_chat.py --config lite.yaml the error message "Incrorrect OpenAI key. Please check your config.yaml file." is misleading, since it is actually using lite.yaml.

from jarvis.

HaroldMitts avatar HaroldMitts commented on May 22, 2024

@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?

from jarvis.

zzfoo avatar zzfoo commented on May 22, 2024

@HaroldMitts no, every time you change config.yaml, you need to run python awesome_chat.py --config config.yaml again, the same go with lite.yaml

from jarvis.

HaroldMitts avatar HaroldMitts commented on May 22, 2024

Have I setup my lite.yaml correctly? The config.yaml uses the same convention where I have my keys in environment variables. You can see in the terminal where I print the keys (masked in the screenshot), to show the environment variables are set.

image

You can also see in the screenshot the error message

python awesome_chat.py --config config. yaml

Traceback (most recent call last):
  File " /home/harold/Jarvis-4.6.2023/server/awesome_chat.py" , line 79, in <module>
    raise valueError("Incrorrect OpenAI key. Please check your config.yaml file.")
ValueError: Incrorrect OpenAI key. Please check your config.yaml file.

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.

from jarvis.

tricktreat avatar tricktreat commented on May 22, 2024

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.")

from jarvis.

HaroldMitts avatar HaroldMitts commented on May 22, 2024

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.

from jarvis.

HaroldMitts avatar HaroldMitts commented on May 22, 2024

Following this, I think I will close this ticket. I got it working. Thanks for the help.
image

from jarvis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.