Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
Other
167.92k stars 44.33k forks source link

Timeout in manual mode if not interacted with for a period of time #4801

Closed NeonN3mesis closed 1 year ago

NeonN3mesis commented 1 year ago

⚠️ Search for existing issues first ⚠️

Which Operating System are you using?

Windows

Which version of Auto-GPT are you using?

Latest Release

Do you use OpenAI GPT-3 or GPT-4?

GPT-3.5

Which area covers your issue best?

Other

Describe your issue.

If you do not interact with Auto-GPT frequently enough you will get an API error when you resume.


  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen
    httplib_response = self._make_request(
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 466, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 461, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1374, in getresponse
    response.begin()
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 486, in send
    resp = conn.urlopen(
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 798, in urlopen
    retries = retries.increment(
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\util\retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen
    httplib_response = self._make_request(
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 466, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 461, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1374, in getresponse
    response.begin()
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\openai\api_requestor.py", line 516, in request_raw
    result = _thread_context.session.request(
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 501, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
    response = iopenai.create_chat_completion(
  File "C:\Users\Nips\Desktop\New_autogpt\Auto-GPT\autogpt\llm\providers\openai.py", line 149, in metered_func
    return func(*args, **kwargs)
  File "C:\Users\Nips\Desktop\New_autogpt\Auto-GPT\autogpt\llm\providers\openai.py", line 183, in _wrapped
    return func(*args, **kwargs)
  File "C:\Users\Nips\Desktop\New_autogpt\Auto-GPT\autogpt\llm\providers\openai.py", line 225, in create_chat_completion
    completion: OpenAIObject = openai.ChatCompletion.create(
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
    return super().create(*args, **kwargs)
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\openai\api_requestor.py", line 216, in request
    result = self.request_raw(
  File "C:\Users\Nips\AppData\Local\Programs\Python\Python310\lib\site-packages\openai\api_requestor.py", line 528, in request_raw
    raise error.APIConnectionError(
openai.error.APIConnectionError: Error communicating with OpenAI: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

### Upload Activity Log Content

_No response_

### Upload Error Log Content

_No response_```
u007 commented 1 year ago

im getting openai timed out, bummer, isnt there supposed to be retry automatically? and openai failure should allow resuming right?

openai.error.Timeout: Request timed out: HTTPSConnectionPool(host=‘[api.openai.com](http://api.openai.com/)’, port=443): Read timed out. (read timeout=600)
Press any key to continue...
NeonN3mesis commented 1 year ago

The original bug has been addressed and fixed however this will happen if you run in manual mode and take too long to give instructions to the agent.

github-actions[bot] commented 1 year ago

This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.

github-actions[bot] commented 1 year ago

This issue was closed automatically because it has been stale for 10 days with no activity.