-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
api request error #2908
Comments
Hey there @m5314! Great to see you back in the digital trenches with us. 🚀 Based on the information you've provided, it seems like you're encountering a "Message Not Exists" error when trying to request the suggested API after successfully getting a message-id from the chat-message API in Dify version 0.5.9. This error could be due to several reasons:
To resolve the issue, ensure that:
If all the above conditions are met and the error persists, it might be necessary to debug further by checking the implementation of the You can find more details about this in the api/controllers/console/explore/message.py file. I hope this helps! If you have any more questions or need further clarification, feel free to ask. Sources
|
Sorry about that, we forgot to mention the |
Self Checks
Dify version
0.5.9
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
I already requested the chat-message api once, and I got a message-id . But when I request the suggested api it returned 404
curl -X POST 'http://127.0.0.1:5001/v1/chat-messages' \ --header 'Authorization: Bearer app-W7VONpikFmcEnMinBTUhua8K' \ --header 'Content-Type: application/json' \ --data-raw '{ "inputs": {}, "query": "What are the specs of the iPhone 13 Pro Max?", "response_mode": "streaming", "conversation_id": "", "user": "abc-123", "files": [ { "type": "image", "transfer_method": "remote_url", "url": "https://cloud.dify.ai/logo/logo-site.png" } ] }'
data: {"event": "message_end", "task_id": "535bf32f-338b-40e0-993b-aa9e85a10d55", "id": "cd9d7a95-5ab7-4aac-8e6e-7652d671c485", "message_id": "cd9d7a95-5ab7-4aac-8e6e-7652d671c485", "conversation_id": "5fcd73b6-0e4a-486b-8d28-bd23b75c0b6f", "metadata": {"usage": {"prompt_tokens": 228, "prompt_unit_price": "0.01", "prompt_price_unit": "0.001", "prompt_price": "0.0022800", "completion_tokens": 69, "completion_unit_price": "0.03", "completion_price_unit": "0.001", "completion_price": "0.0020700", "total_tokens": 297, "total_price": "0.0043500", "currency": "USD", "latency": 3.853132416988956}}}
curl 'http://127.0.0.1:5001/v1/messages/cd9d7a95-5ab7-4aac-8e6e-7652d671c485/suggested' --header 'Authorization: Bearer app-W7VONpikFmcEnMinBTUhua8K' --header 'Content-Type: application/json'
{ "code": "not_found", "message": "Message Not Exists.", "status": 404 }
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
The text was updated successfully, but these errors were encountered: