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
168.08k stars 44.35k forks source link

Often after more than a dozen steps, when google returned,a time out problem occurs #4633

Closed ccdanpian closed 1 year ago

ccdanpian commented 1 year ago

⚠️ Search for existing issues first ⚠️

Which Operating System are you using?

Docker

Which version of Auto-GPT are you using?

Master (branch)

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

GPT-3.5

Which area covers your issue best?

Memory

Describe your issue.

Often after more than a 10+ steps, and when Google returns a large amount of search content, a time out problem occurs, and a long-step task has not been completed normally on 0.4. I have tried several similar tasks on 0.3.1 before and have never had this problem.

Is this problem related to the new storage method?

error

Upload Activity Log Content

No response

Upload Error Log Content

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 466, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 461, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse response.begin() File "/usr/local/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.10/http/client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/local/lib/python3.10/socket.py", line 705, in readinto return self._sock.recv_into(b) File "/usr/local/lib/python3.10/ssl.py", line 1274, in recv_into return self.read(nbytes, buffer) File "/usr/local/lib/python3.10/ssl.py", line 1130, in read return self._sslobj.read(len, buffer) TimeoutError: The read operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 798, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.10/site-packages/urllib3/packages/six.py", line 770, in reraise raise value File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 714, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 468, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 357, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='cc-openai.openai.azure.com', port=443): Read timed out. (read timeout=600) During handling of the above exception, another exception occurred: Traceback (most recent call last):

gravelBridge commented 1 year ago

Thank you for reporting this issue, @ccdanpian. It seems like you're experiencing a timeout issue when Google returns a large amount of search content after more than 10 steps. This is indeed a problem, especially if it's preventing long-step tasks from completing normally.

The traceback you provided suggests that the issue is related to a read operation timing out. This could be due to a number of reasons, such as network latency, server-side issues, or indeed, as you suggested, it could be related to changes in the storage method.

We'll need to investigate this further to determine the exact cause and find a solution. In the meantime, you could try increasing the timeout value as a temporary workaround, although this might not be ideal if the underlying issue is related to the storage method or server-side problems.

We appreciate your patience and understanding as we work to resolve this issue. Please continue to report any other problems you encounter or any additional information that could help us diagnose this issue.

ianbmacdonald commented 1 year ago

lol @gravelBridge is this an AutoGPT agent response ..

swiftyjam commented 1 year ago

Hey same issue here: let me provide the output:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 466, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 461, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse response.begin() File "/usr/local/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.10/http/client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/local/lib/python3.10/socket.py", line 705, in readinto return self._sock.recv_into(b) File "/usr/local/lib/python3.10/ssl.py", line 1274, in recv_into return self.read(nbytes, buffer) File "/usr/local/lib/python3.10/ssl.py", line 1130, in read return self._sslobj.read(len, buffer) TimeoutError: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 798, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.10/site-packages/urllib3/packages/six.py", line 770, in reraise raise value File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 714, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 468, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 357, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 516, in request_raw result = _thread_context.session.request( File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 532, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=600)

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

Traceback (most recent call last): File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/app/autogpt/main.py", line 5, in autogpt.app.cli.main() File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in call return self.main(args, kwargs) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1666, in invoke rv = super().invoke(ctx) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke return __callback(args, kwargs) File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func return f(get_current_context(), *args, *kwargs) File "/app/autogpt/app/cli.py", line 121, in main run_auto_gpt( File "/app/autogpt/app/main.py", line 199, in run_auto_gpt run_interaction_loop(agent) File "/app/autogpt/app/main.py", line 280, in run_interaction_loop command_name, command_args, assistant_reply_dict = agent.think() File "/app/autogpt/agents/base.py", line 109, in think raw_response = create_chat_completion( File "/app/autogpt/llm/utils/init.py", line 157, in create_chat_completion response = iopenai.create_chat_completion( File "/app/autogpt/llm/providers/openai.py", line 147, in metered_func return func(args, kwargs) File "/app/autogpt/llm/providers/openai.py", line 182, in _wrapped return func(*args, *kwargs) File "/app/autogpt/llm/providers/openai.py", line 231, in create_chat_completion completion: OpenAIObject = openai.ChatCompletion.create( File "/usr/local/lib/python3.10/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(args, **kwargs) File "/usr/local/lib/python3.10/site-packages/openai/api_resources/abstract/engine_apiresource.py", line 153, in create response, , api_key = requestor.request( File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 216, in request result = self.request_raw( File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 526, in request_raw raise error.Timeout("Request timed out: {}".format(e)) from e openai.error.Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=600)

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.