yoheinakajima / babyagi

MIT License
19.66k stars 2.57k forks source link

OpenAI API invalid request. #322

Open montenegronyc opened 1 year ago

montenegronyc commented 1 year ago

Been trying to run this one: 64e8bdb With OpenAI gpt-3.5-turbo, and ChromeDB, and can't seem to get past this error on the first task: 'create task list.'

OpenAI API invalid request. Check the documentation for the specific API method you are calling and make sure you are sending valid and complete parameters. Waiting 10 seconds and trying again.

OpenAI key is correct, I have perms and billing set up to use the API, etc.

jsemrau commented 1 year ago

This could be related to an outdated openai package. Which version are you using? (pip show openai)

I am using 0.27.2 and it seems to run with that version.

dr3s commented 1 year ago

huh, I get this error with gpt-4 but gpt-3.5-tubo works fine.

jsemrau commented 1 year ago

Could you post the error message? Is it the same as above?

Also could you post the output from pip show openai --version

montenegronyc commented 1 year ago

Here's the openai output: ~/BabyAGI-v03$ pip show openai --version Name: openai Version: 0.27.7 Summary: Python client library for the OpenAI API Home-page: https://github.com/openai/openai-python Author: OpenAI Author-email: support@openai.com License: None Location: /home/runner/BabyAGI-v03/venv/lib/python3.10/site-packages Requires: tqdm, requests, aiohttp Required-by:

I did manage to get it working after adding a little verbose logging code and saw that it was hanging on the temperature command. It says the variable is not a number, which doesn't make sense as I'd been using 0.0. I commented out any of the temperature references and now it seems to be working.

dr3s commented 1 year ago

Works with gpt-3.5-turbo, error on gpt-4

OpenAI API invalid request. Check the documentation for the specific API method you are calling and make sure you are sending valid and complete parameters. Waiting 10 seconds and trying again.

❯ pip show openai
Name: openai Version: 0.27.4 Summary: Python client library for the OpenAI API Home-page: https://github.com/openai/openai-python Author: OpenAI Author-email: support@openai.com License: Location: /Users/dres/.asdf/installs/python/miniconda3-latest/lib/python3.10/site-packages Requires: aiohttp, requests, tqdm Required-by: (base)

dr3s commented 1 year ago

@montenegronyc thanks. I haven't had a chance to debug but I'll check out the temperature argument.