reworkd / AgentGPT

🤖 Assemble, configure, and deploy autonomous AI Agents in your browser.
https://agentgpt.reworkd.ai
GNU General Public License v3.0
31.68k stars 9.23k forks source link

🚨 ERROR accessing OpenAI APIs. Please check your API key or try again later. #411

Open 4a9m0011 opened 1 year ago

4a9m0011 commented 1 year ago

The latest version.paid account.I'm in tw. Unlikely to be a network accessibility issue.I can guarantee that both accounts and keys are valid.I can use the same API in other applications. image image image

SkyLifewood commented 1 year ago

facing this issue too.

wrl1214 commented 1 year ago

facing too>_<,how to resolve?

morenokosta commented 1 year ago

Ho anche io lo stesso problema 😢

JorgaWetzel commented 1 year ago

Same problem here, please fix it.

xiaohei6856 commented 1 year ago

image server error

faddy19 commented 1 year ago

I have the same issue, what is the problem exactly?

faddy19 commented 1 year ago

-->> SOLVED

I have solved the problem

Your Openai API Keys need to be identical. I had the problem that I had 2 different Openai API Keys so the system could not authenticate. Just check your .env and all places where you set the OPENAI API Key

xiaohei6856 commented 1 year ago
deemack918 commented 1 year ago

I also have this problem

mgoldboi commented 1 year ago

same issue here as well, on latest

deemack918 commented 1 year ago

Solved: you have to put your payment info into https://platform.openai.com/ ---> view API Keys ---> Billing then add a payment method in there. It's separate from your paid version of chatgpt. It charges you each time you use the API. Don't worry, it's pennies and you can set the limits to whatever you want.

p6002 commented 1 year ago

How to fix it? This is not a billing info problem.

foolsh commented 1 year ago

I'm adding myself to this issue, I have a development environment setup fresh from source, open AI api keys in place and have been using my account for a few billing cycles. I can confirm my key is correct by using it in another project. There seems to be no other debug information from any of the console outputs for

#-> poetry install && poetry run python -m reworkd_platform
Installing dependencies from lock file

Package operations: 1 install, 0 updates, 0 removals

  • Installing mysqlclient (2.1.1)

Installing the current project: reworkd_platform (0.1.0)
INFO:     Will watch for changes in these directories: ['/home/bbrown/src/AgentGPT/platform']
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [821083] using WatchFiles
2023-05-29 05:33:11.955 | INFO     | logging:callHandlers:1706 - Started server process [821769]
2023-05-29 05:33:11.955 | INFO     | logging:callHandlers:1706 - Waiting for application startup.
2023-05-29 05:33:12.112 | INFO     | logging:callHandlers:1706 - Application startup complete.

Or from

#-> npm run dev

> agent-gpt@0.5.0 dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /home/bbrown/src/AgentGPT/next/.env
event - compiled client and server successfully in 834 ms (357 modules)
wait  - compiling /api/auth/[...nextauth] (client and server)...
wait  - compiling /_error (client and server)...
event - compiled client and server successfully in 1023 ms (386 modules)
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
wait  - compiling / (client and server)...
event - compiled client and server successfully in 1225 ms (1364 modules)
wait  - compiling...
event - compiled client and server successfully in 1270 ms (1364 modules)

Any thoughts?

tamaosaka commented 1 year ago

“Any thoughts?

hello, is this what?

My impression is that I am happy with the situation and I am very grateful.

If it is not related to me, I apologize for the inconvenience, but I would like you to teach me.

Thank you for your continued support. tama

foolsh commented 1 year ago

I think I've solved this, but I'm not sure I haven't looked into it, but it seems that gpt-4 is not available to my openai api usage, and only gpt-3 is available. Can some one in the know confirm if gpt-4 is mandatory to run AgentGPT?

Without gpt-4 access the project gives an error message perhaps.

asim-shrestha commented 1 year ago

gpt-4 is not mandatory @foolsh.

I think there may be several issues packed into one here.

  1. Firstly, our setup.sh script have been outdated. We have recently moved to a Python backend and when the python backend wasn't running, you'd still get this issue. To fix this, please fetch the latest changes and run ./setup.sh
  2. You may not have access to OpenAI in your region. In this case, you'll need to use a proxy to gain access. We have added an env value for OpenAI base url in this case.
  3. As someone pointed out, you simply may not have had billing enabled. For this case, we will need to update our own error messaging to fix this. In the meantime, look at your logs and also the dev console for the request to diagnose further. Also ensure you have billing enabled

@4a9m0011 @SkyLifewood @wrl1214 @morenokosta @deemack918 @tamaosaka @foolsh @mgoldboi @p6002

tamaosaka commented 1 year ago

hello, thanks mention. mention nothing i confuse so don't reply.

I do not have billing enabled. I haven't used AgentGPT in a while.

I will set it to disabled, but I would like to ask for a little more time because I will be staying up all night due to overlapping investigations.

Thank you for your continued support. tamaoaka

JohBlac commented 1 year ago

yes