SuperAGI
SuperAGI copied to clipboard
invalid_api_key error_message= error_param=None error_type=invalid_request_error message='OpenAI API error received' stream_error=False
I made a brand new installation of the latest version of SuperAGI v0.0.5
SuperAGI is running in my browser with default parameter, but it remains stuck on the step of determining the next step.
Terminal extract
superagi-celery-1 | Ensure the response can be parsed by Python json.loads.
superagi-celery-1 |
superagi-celery-1 | [2023-06-15 13:37:49,621: INFO/ForkPoolWorker-7] error_code=invalid_api_key error_message= error_param=None error_type=invalid_request_error message='OpenAI API error received' stream_error=False
superagi-celery-1 | [2023-06-15 13:37:49,622: WARNING/ForkPoolWorker-7] Exception:
superagi-celery-1 | [2023-06-15 13:37:49,622: WARNING/ForkPoolWorker-7]
superagi-celery-1 | [2023-06-15 13:37:49,622: WARNING/ForkPoolWorker-7] <empty message>
superagi-celery-1 | [2023-06-15 13:37:49,664: ERROR/ForkPoolWorker-7] Task execute_agent[2a80b198-accb-411d-a3af-2468174140f5] raised unexpected: KeyError('content')
superagi-celery-1 | Traceback (most recent call last):
superagi-celery-1 | File "/usr/local/lib/python3.9/site-packages/celery/app/trace.py", line 451, in trace_task
superagi-celery-1 | R = retval = fun(*args, **kwargs)
superagi-celery-1 | File "/usr/local/lib/python3.9/site-packages/celery/app/trace.py", line 734, in __protected_call__
superagi-celery-1 | return self.run(*args, **kwargs)
superagi-celery-1 | File "/usr/local/lib/python3.9/site-packages/celery/app/autoretry.py", line 54, in run
superagi-celery-1 | ret = task.retry(exc=exc, **retry_kwargs)
superagi-celery-1 | File "/usr/local/lib/python3.9/site-packages/celery/app/task.py", line 717, in retry
superagi-celery-1 | raise_with_context(exc)
superagi-celery-1 | File "/usr/local/lib/python3.9/site-packages/celery/app/autoretry.py", line 34, in run
superagi-celery-1 | return task._orig_run(*args, **kwargs)
superagi-celery-1 | File "/app/superagi/worker.py", line 18, in execute_agent
superagi-celery-1 | AgentExecutor().execute_next_action(agent_execution_id=agent_execution_id)
superagi-celery-1 | File "/app/superagi/jobs/agent_executor.py", line 153, in execute_next_action
superagi-celery-1 | response = spawned_agent.execute(agent_workflow_step)
superagi-celery-1 | File "/app/superagi/agent/super_agi.py", line 162, in execute
superagi-celery-1 | if response['content'] is None:
@AgimaFR, make sure:
- Your Billing is set with subscription payment https://platform.openai.com/account/billing/payment-methods.
- API Key is correct and inside the
config.yaml
file (OPENAI_API_KEY: <KEY>). - If you changed your API KEY, try to re-load the stack. Running
docker-compose down
thendocker-compose up --build
again.
The error should disappear.
@brunobuger Thanks for your quick reply 🙏
As mentioned, I did a full install of version 0.05 this morning after deleting everything.
My billing account is ok with OpenAI and I created a new API key specifically for the new installation.
I've just tried your tip docker-compose down
then docker-compose up --build
but the problem remains the same 😢
Note: Everything worked fine with the previous version.
Hmmm Then, you can try to do a full cleanup:
- From SuperAGI folder, run
docker-compose down
- also,
docker volume prune -f
- Now access https://www.pinecone.io/, and delete the existent index.
- Finally,
docker-compose up --build
Worked for me 🍀
Still the same problem after following your last instructions 😢 but thank you very much for your help @brunobuger
superagi-celery-1 | [2023-06-16 14:22:04,076: INFO/ForkPoolWorker-7] error_code=invalid_api_key error_message= error_param=None error_type=invalid_request_error message='OpenAI API error received' stream_error=False
superagi-celery-1 | [2023-06-16 14:22:04,077: WARNING/ForkPoolWorker-7] Exception:
superagi-celery-1 | [2023-06-16 14:22:04,077: WARNING/ForkPoolWorker-7]
superagi-celery-1 | [2023-06-16 14:22:04,077: WARNING/ForkPoolWorker-7] <empty message>
superagi-celery-1 | [2023-06-16 14:22:04,115: INFO/MainProcess] Task execute_agent[06899716-6ad0-446e-a27e-9beaaa74321d] received
superagi-celery-1 | [2023-06-16 14:22:04,118: INFO/ForkPoolWorker-7] Task execute_agent[06899716-6ad0-446e-a27e-9beaaa74321d] retry: Retry in 25s: KeyError('content')
If you look at my OpenAI API key created for the new SuperAGI installation, you'll see that it's never been used.
I found a solution:
- I simply clicked on the gear in the top right-hand corner,
- I entered my OPENAI API key
- I validated
Everything's ok now, although I still don't understand why it didn't work before 🤔
Thanks, I had the same issue and this helped me resolve it.
If you've had the same problem, there's definitely a problem in the code with reading the OPENAI API key 🤔
I have also had same issue but iv also had error from openai which is error 404 which it says its not working because it not set as organisation, i when in to setting and changed account from personal to business and tried gain, no change.