Replies: 1 comment 1 reply
-
My searches have not been successful. Are there any special requirements for setting up agents, for compatibility with the openai calling scheme |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I do this request example this query with my data
curl --request POST
--url http://{address}/api/v1/agents_openai/{agent_id}/chat/completions
--header 'Content-Type: application/json'
--header 'Authorization: Bearer <YOUR_API_KEY>'
--data '{
"model": "model",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"stream": true
}'
And here is the result that I receive
2025-08-02 23:37:35.492 | 2025-08-03 03:37:35,491 INFO 31 task_executor_e36c011ab7ff_0 reported heartbeat: {"name": "task_executor_e36c011ab7ff_0", "now": "2025-08-03T03:37:35.491+08:00", "boot_at": "2025-08-02T20:19:50.084+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": {}}
2025-08-02 23:37:41.006 | 2025-08-03 03:37:41,005 INFO 22 172.20.0.6 - - [03/Aug/2025 03:37:41] "POST /api/v1/agents_openai/5cded6666fcb11f085a3e2da3602cdda/chat/completions HTTP/1.1" 500 -
2025-08-02 23:37:41.009 | 2025-08-03 03:37:41,007 ERROR 22 Error on request:
2025-08-02 23:37:41.009 | Traceback (most recent call last):
2025-08-02 23:37:41.009 | File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/serving.py", line 370, in run_wsgi
2025-08-02 23:37:41.009 | execute(self.server.app)
2025-08-02 23:37:41.009 | File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/serving.py", line 333, in execute
2025-08-02 23:37:41.009 | for data in application_iter:
2025-08-02 23:37:41.009 | File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/wsgi.py", line 256, in next
2025-08-02 23:37:41.009 | return self._next()
2025-08-02 23:37:41.009 | File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/wrappers/response.py", line 32, in _iter_encoded
2025-08-02 23:37:41.009 | for item in iterable:
2025-08-02 23:37:41.009 | File "/ragflow/api/db/services/canvas_service.py", line 240, in completionOpenAI
2025-08-02 23:37:41.009 | canvas.messages.append({"role": "user", "content": question, "id": message_id})
2025-08-02 23:37:41.009 | AttributeError: 'Canvas' object has no attribute 'messages'
For clarity, I will use the simplest version:
Begin - agent - message
Chat embed works
OpenAI compatible stopped working after updating to version 0.20.0.
Also, the question is, did I understand correctly that all agents need to be rebuilt, since the new logic is different and needs to be created anew.
But if I call the agent via API_openAI
using this
http://{address}/api/v1/agents_openai/{agent_id}/chat/completions
then I get an error
Please help
Beta Was this translation helpful? Give feedback.
All reactions