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

OpenAI exception while live demo #69

Open
thammegowda opened this issue Sep 6, 2022 · 0 comments
Open

OpenAI exception while live demo #69

thammegowda opened this issue Sep 6, 2022 · 0 comments

Comments

@thammegowda
Copy link
Member

thammegowda commented Sep 6, 2022

Traceback (most recent call last):                                                                                                                                                            │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/urllib3/connectionpool.py", line 710, in urlopen                                                                            │
    chunked=chunked,                                                                                                                                                                          │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/urllib3/connectionpool.py", line 449, in _make_request                                                                      │
    six.raise_from(e, None)                                                                                                                                                                   │
  File "<string>", line 3, in raise_from                                                                                                                                                      │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/urllib3/connectionpool.py", line 444, in _make_request                                                                      │
    httplib_response = conn.getresponse()                                                                                                                                                     │
  File "/home/darma/.conda/envs/darma/lib/python3.7/http/client.py", line 1373, in getresponse                                                                                                │
    response.begin()                                                                                                                                                                          │
  File "/home/darma/.conda/envs/darma/lib/python3.7/http/client.py", line 319, in begin                                                                                                       │
    version, status, reason = self._read_status()                                                                                                                                             │
  File "/home/darma/.conda/envs/darma/lib/python3.7/http/client.py", line 288, 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 "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/requests/adapters.py", line 499, in send                                                                                    │
    timeout=timeout,                                                                                                                                                                          │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/urllib3/connectionpool.py", line 788, in urlopen                                                                            │
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]                                                                                                                           │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/urllib3/util/retry.py", line 550, in increment                                                                              │
    raise six.reraise(type(error), error, _stacktrace)                                                                                                                                        │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/urllib3/packages/six.py", line 769, in reraise                                                                              │
    raise value.with_traceback(tb)                                                                                                                                                            │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/urllib3/connectionpool.py", line 710, in urlopen                                                                            │
    chunked=chunked,                                                                                                                                                                          │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/urllib3/connectionpool.py", line 449, in _make_request                                                                      │
    six.raise_from(e, None)                                                                                                                                                                   │
  File "<string>", line 3, in raise_from                                                                                                                                                      │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/urllib3/connectionpool.py", line 444, in _make_request                                                                      │
    httplib_response = conn.getresponse()                                                                                                                                                     │
  File "/home/darma/.conda/envs/darma/lib/python3.7/http/client.py", line 1373, in getresponse                                                                                                │
    response.begin()                                                                                                                                                                          │
  File "/home/darma/.conda/envs/darma/lib/python3.7/http/client.py", line 319, in begin                                                                                                       │
    version, status, reason = self._read_status()                                                                                                                                             │
  File "/home/darma/.conda/envs/darma/lib/python3.7/http/client.py", line 288, in _read_status                                                                                                │
    raise RemoteDisconnected("Remote end closed connection without"                                                                                                                           │
urllib3.exceptions.ProtocolError: ('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):                                                                                                                                                            │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/mephisto/abstractions/_subcomponents/task_runner.py", line 270, in _launch_and_run_unit                                     │
    self.run_unit(unit, agent)                                                                                                                                                                │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/mephisto/abstractions/blueprints/parlai_chat/parlai_chat_task_runner.py", line 278, in run_unit                             │
    world.parley()                                                                                                                                                                            │
  File "/home/darma/work/isi_darma/darma_chat/darma_chat/worlds.py", line 205, in parley                                                                                                      │
    acts[idx] = agent.act(timeout=self.max_resp_time)                                                                                                                                         │
  File "/home/darma/work/isi_darma/darma_chat/darma_chat/gpt_agent.py", line 44, in act                                                                                                       │
    resp = self.query_completion_api(p, engine=self.engine, frequency_penalty=2, presence_penalty=2, temperature=1)                                                                           │
  File "/home/darma/work/isi_darma/darma_chat/darma_chat/gpt_agent.py", line 72, in query_completion_api                                                                                      │
    stop=["user A:", "user B:", "user C:", "user D:"]                                                                                                                                         │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/openai/api_resources/completion.py", line 31, in create                                                                     │
    return super().create(*args, **kwargs)                                                                                                                                                    │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 106, in create                                                  │
    request_id=request_id,                                                                                                                                                                    │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/openai/api_requestor.py", line 120, in request                                                                              │
    request_id=request_id,                                                                                                                                                                    │
  File "/home/darma/.conda/envs/darma/lib/python3.7/site-packages/openai/api_requestor.py", line 302, in request_raw                                                                          │
    raise error.APIConnectionError("Error communicating with OpenAI") from e                                                                                                                  │
openai.error.APIConnectionError: Error communicating with OpenAI
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

1 participant