Skip to content
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

API Error: The server had an error while processing your request. #2553

Closed
1 task done
LecJackS opened this issue Apr 19, 2023 · 10 comments
Closed
1 task done

API Error: The server had an error while processing your request. #2553

LecJackS opened this issue Apr 19, 2023 · 10 comments

Comments

@LecJackS
Copy link

LecJackS commented Apr 19, 2023

⚠️ Search for existing issues first ⚠️

  • I have searched the existing issues, and there is no existing issue for my problem

Which Operating System are you using?

Linux

GPT-3 or GPT-4?

GPT-3.5

Steps to reproduce 🕹

This happened on the Stable branch.

Hard to reproduce: Need to wait for OpenAI servers to reply with an error.

Current behavior 😯

My Auto-GPT was doing great until everything got interrupted by an OpenAI server error.

Expected behavior 🤔

Exception handling so the bot execution is not interrupted.

Your prompt 📝

# Bot learning the good stuff about life, until suddenly...

Your Logs 📒

# ...
NEXT ACTION:  COMMAND = evaluate_code ARGUMENTS = {'code': "# some-generated-code"}
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/jack/Auto-GPT/autogpt/__main__.py", line 53, in <module>
    main()
  File "/home/jack/Auto-GPT/autogpt/__main__.py", line 49, in main
    agent.start_interaction_loop()
  File "/home/jack/Auto-GPT/autogpt/agent/agent.py", line 170, in start_interaction_loop
    self.memory.add(memory_to_add)
  File "/home/jack/Auto-GPT/autogpt/memory/local.py", line 76, in add
    embedding = create_embedding_with_ada(text)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jack/Auto-GPT/autogpt/llm_utils.py", line 137, in create_embedding_with_ada
    return openai.Embedding.create(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jack/miniconda3/envs/autogpt/lib/python3.11/site-packages/openai/api_resources/embedding.py", line 33, in create
    response = super().create(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jack/miniconda3/envs/autogpt/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(
                           ^^^^^^^^^^^^^^^^^^
  File "/home/jack/miniconda3/envs/autogpt/lib/python3.11/site-packages/openai/api_requestor.py", line 226, in request
    resp, got_stream = self._interpret_response(result, stream)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jack/miniconda3/envs/autogpt/lib/python3.11/site-packages/openai/api_requestor.py", line 619, in _interpret_response
    self._interpret_response_line(
  File "/home/jack/miniconda3/envs/autogpt/lib/python3.11/site-packages/openai/api_requestor.py", line 682, in _interpret_response_line
    raise self.handle_error_response(
openai.error.APIError: The server had an error while processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID b6236f221e359a59794964 in your message.) {
  "error": {
    "message": "The server had an error while processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID 1db62cf736f2e365e597949 in your message.)",
    "type": "server_error",
    "param": null,
    "code": null
  }
}
 500 {'error': {'message': 'The server had an error while processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID 1dcf736f2265e59a5997794 in your message.)', 'type': 'server_error', 'param': None, 'code': None}} {'Date': 'Wed, 19 Apr 2023 15:43:21 GMT', 'Content-Type': 'application/json', 'Content-Length': '366', 'Connection': 'keep-alive', 'access-control-allow-origin': '*', 'openai-organization': 'user-qojwgdpc5dsm6xmgn2', 'openai-processing-ms': '30015', 'openai-version': '2020-10-01', 'strict-transport-security': 'max-age=15724800; includeSubDomains', 'x-ratelimit-limit-requests': '60', 'x-ratelimit-remaining-requests': '59', 'x-ratelimit-reset-requests': '1s', 'x-request-id': '1db62cf736f221e365e59a5997794964', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '7ba6428469d4ba74-EZE', 'alt-svc': 'h3=":443"; ma=86400, h3-29=":443"; ma=86400'}
(autogpt) jack@pc:~/Auto-GPT$  
@Drlordbasil
Copy link

Drlordbasil commented Apr 19, 2023

It seems to be an API issues, I've had to rerun multiple times. could be servers being updated or overloaded.
I've noticed it only happened rarely before, now it's a bit more prevelent, but it's not the script.

@dturton
Copy link

dturton commented Apr 19, 2023

Same thing happening to me several times already.

@Drlordbasil
Copy link

Drlordbasil commented Apr 19, 2023 via email

@JanKuehne
Copy link

same thing here

@djancan
Copy link

djancan commented Apr 19, 2023

Then should the script out put a Time-Out from server. Auto Retry in (from 1 to 30 sec) seconds ??? Hit Return to stop or system will retry 10 times before giving up.

@BoccheseGiacomo
Copy link

It would be useful to add some Try-except blocks to handle api connection errors and automatical retry

@Drlordbasil
Copy link

It would be useful to add some Try-except blocks to handle api connection errors and automatical retry

thatd be a nice addition for qol

@shierro
Copy link

shierro commented Apr 20, 2023

yep, would be nice to catch this specific error and have a retry logic. is there anyone currently working on this and is it something that the maintainers are OK with? Would like to help in any way

@ntindle
Copy link
Member

ntindle commented Apr 20, 2023

Duplicate of #2399; related: #214

1 similar comment
@ntindle
Copy link
Member

ntindle commented Apr 21, 2023

Duplicate of #2399; related: #214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants