ERROR Converse with agent by HTTP API #4810
Unanswered
zhkmxx9302013
asked this question in
Q&A
Replies: 1 comment
-
Do you have backend error log? |
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
-
First I create a session by using
`curl --request POST --url http://192.168.xxx/api/v1/agents/e30b6550e1f111efb2ff0242xxxx/sessions --header 'Content-Type: application/json' --header 'Authorization: Bearer ragflow-ZiN2RiMxxxx' --data '{
then server response the sessionID
9004439ae61011ef90a80242ac120006`Second I Chat with the agent by using
curl --request POST --url http://192.168.xxx/api/v1/agents/e30b6550e1f111efb2ff0242xxxx/completions --header 'Content-Type: application/json' --header 'Authorization: Bearer ragflow-ZiN2RiMxxxx' --data-binary ' { "question": "{\"pltid\":\"1001\",\"lll\":[ {\"id\":\"2006\",\"type\":\"mmm\",\"AS\":\"A\",\"hm\":100000,\"mk\":10,\"lll\":1},{\"id\":\"2002\",\"type\":\"ttt\",\"AS\":\"A\",\"hm\":100000,\"mk\":0,\"lll\":2},{\"id\":\"2003\",\"type\":\"ggg\",\"AS\":\"A\",\"hm\":160000,\"mk\":10,\"lll\":3}]}", "stream": true, "session_id": "9004439ae61011ef90a80242ac120006" }'
for the first time curl, the response is normal. but when I execute the curl command secondly, there is a error code below.
`data:{"code": 500, "message": "list index out of range", "data": {"answer": "ERROR: list index out of range", "reference": []}}
data:{"code": 0, "message": "", "data": true}
`
how to deal with it
Beta Was this translation helpful? Give feedback.
All reactions