Replies: 1 comment
-
hey @alfin06 sorry for the late reply, from the error message
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Help needed. I have followed the documentation for the installation process including setup the API, and I tried to create my first agent. But I always get some errors (see below). I do not know which step I was missing.
P.S.: I have tested my openai key with its api base url and it worked fine.
2025-01-07 15:40:19,369 - camel.models.model_manager - ERROR - Error processing with model: <camel.models.openai_model.OpenAIModel object at 0x7f116cffa060>
2025-01-07 15:40:19,369 - camel.agents.chat_agent - ERROR - An error occurred while running model gpt-4, index: 0
Traceback (most recent call last):
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
yield
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpx/_transports/default.py", line 250, in handle_request
resp = self._pool.handle_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request
raise exc from None
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request
response = connection.handle_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 101, in handle_request
raise exc
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 78, in handle_request
stream = self._connect(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 124, in _connect
stream = self._network_backend.connect_tcp(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpcore/_backends/sync.py", line 207, in connect_tcp
with map_exceptions(exc_map):
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/contextlib.py", line 158, in exit
self.gen.throw(value)
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError: [Errno 99] Cannot assign requested address
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_base_client.py", line 993, in _request
response = self._client.send(
^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpx/_client.py", line 914, in send
response = self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpx/_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpx/_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpx/_client.py", line 1014, in _send_single_request
response = transport.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpx/_transports/default.py", line 249, in handle_request
with map_httpcore_exceptions():
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/contextlib.py", line 158, in exit
self.gen.throw(value)
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError: [Errno 99] Cannot assign requested address
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/fdse/agent-bugs/camel/camel/agents/chat_agent.py", line 1088, in _step_model_response
response = self.model_backend.run(openai_messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/agent-bugs/camel/camel/models/model_manager.py", line 211, in run
raise exc
File "/home/fdse/agent-bugs/camel/camel/models/model_manager.py", line 201, in run
response = self.current_model.run(messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/agent-bugs/camel/camel/models/openai_model.py", line 159, in run
response = self._client.chat.completions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_utils/_utils.py", line 275, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/resources/chat/completions.py", line 859, in create
return self._post(
^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_base_client.py", line 1280, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_base_client.py", line 957, in request
return self._request(
^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_base_client.py", line 1017, in _request
return self._retry_request(
^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_base_client.py", line 1095, in _retry_request
return self._request(
^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_base_client.py", line 1017, in _request
return self._retry_request(
^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_base_client.py", line 1095, in _retry_request
return self._request(
^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_base_client.py", line 1017, in _request
return self._retry_request(
^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_base_client.py", line 1095, in _retry_request
return self._request(
^^^^^^^^^^^^^^
File "/home/fdse/anaconda3/envs/faissgpu/lib/python3.12/site-packages/openai/_base_client.py", line 1027, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
Traceback (most recent call last):
File "/home/fdse/agent-bugs/camel/main.py", line 28, in
response = agent.step(usr_msg)
^^^^^^^^^^^^^^^^^^^
File "/home/fdse/agent-bugs/camel/camel/agents/chat_agent.py", line 605, in step
return self._handle_step(response_format, self.single_iteration)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/agent-bugs/camel/camel/agents/chat_agent.py", line 671, in _handle_step
) = self._step_model_response(openai_messages, num_tokens)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fdse/agent-bugs/camel/camel/agents/chat_agent.py", line 1099, in _step_model_response
raise ModelProcessingError(
camel.models.model_manager.ModelProcessingError: Unable to process messages: none of the provided models run succesfully.
Beta Was this translation helpful? Give feedback.
All reactions