You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this model and providing it to my Agents:
model = OpenAIChatCompletionsModel(
model="cogito-v1-preview-llama-8b",
openai_client=AsyncOpenAI(
base_url="http://localhost:1234/v1"
)
)
The Agent.run() produces this error:
2025-04-29 15:21:17,826 - INFO - Retrying request to /chat/completions in 0.403615 seconds
2025-04-29 15:21:18,231 - INFO - Retrying request to /chat/completions in 0.819511 seconds
INFO: 127.0.0.1:34818 - "POST / HTTP/1.1" 500 Internal Server Error
2025-04-29 15:21:19,070 - ERROR - An unexpected error occurred:
Traceback (most recent call last):
File "/home/sam/anaconda3/lib/python3.12/site-packages/anyio/_core/_sockets.py", line 175, in try_connect
stream = await asynclib.connect_tcp(remote_host, remote_port, local_address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sam/anaconda3/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 2590, in connect_tcp
await get_running_loop().create_connection(
File "/home/sam/anaconda3/lib/python3.12/asyncio/base_events.py", line 1121, in create_connection
raise exceptions[0]
File "/home/sam/anaconda3/lib/python3.12/asyncio/base_events.py", line 1103, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sam/anaconda3/lib/python3.12/asyncio/base_events.py", line 1006, in _connect_sock
await self.sock_connect(sock, address)
File "/home/sam/anaconda3/lib/python3.12/asyncio/selector_events.py", line 651, in sock_connect
return await fut
^^^^^^^^^
File "/home/sam/anaconda3/lib/python3.12/asyncio/selector_events.py", line 691, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 1234)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/sam/anaconda3/lib/python3.12/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
yield
File "/home/sam/anaconda3/lib/python3.12/site-packages/httpcore/_backends/anyio.py", line 114, in connect_tcp
stream: anyio.abc.ByteStream = await anyio.connect_tcp(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sam/anaconda3/lib/python3.12/site-packages/anyio/_core/_sockets.py", line 241, in connect_tcp
raise OSError("All connection attempts failed") from cause
OSError: All connection attempts failed
The endpoint at http://localhost:1234/v1 works when I cURL it, for example:
curl http://localhost:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "cogito-v1-preview-llama-8b",
"messages": [
{ "role": "system", "content": "Always answer in rhymes. Today is Thursday" },
{ "role": "user", "content": "What day is it today?" }
],
"temperature": 0.7,
"max_tokens": -1,
"stream": false
}'
But for some reason I can't get it to work with the Agents SDK
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
When using this model and providing it to my Agents:
The
Agent.run()
produces this error:The endpoint at
http://localhost:1234/v1
works when I cURL it, for example:But for some reason I can't get it to work with the Agents SDK
The text was updated successfully, but these errors were encountered: