Why doesn't the /chat-messages API allow passes context messages as a list? #2663

Closed
opened 2026-02-21 17:48:31 -05:00 by yindo · 0 comments
Owner

Originally created by @jamie0725 on GitHub (Apr 25, 2024).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Pleas do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing?

Hi, I am new to the platform, but while I look through the API documentation (as attached below), I notice that the user is not allowed to pass the context history on his own. The feature is important for customer support scenarios where the AI agent is not the only responder in the conversation (i.e., there might be a human agent and other business messages previously involved). This means that relying solely on the context history of the agent will not suffice to answer the user's question:

curl -X POST 'https://api.dify.ai/v1/chat-messages' \
--header 'Authorization: Bearer {api_key}' \
--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"
      }
    ]
}'

2. Describe the feature you'd like to see

I'd like to have the query field to support list conversations to carry the context (similar to ChatGPT messages), and in this case not using the context information of the dify platform.
image

3. How will this feature improve your workflow or experience?

a must for customer support, if no workaround is available.

4. Additional context or comments

No response

5. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @jamie0725 on GitHub (Apr 25, 2024). ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Pleas do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Hi, I am new to the platform, but while I look through the API documentation (as attached below), I notice that the user is not allowed to pass the context history on his own. The feature is important for customer support scenarios where the AI agent is not the only responder in the conversation (i.e., there might be a human agent and other business messages previously involved). This means that relying solely on the context history of the agent will not suffice to answer the user's question: ``` curl -X POST 'https://api.dify.ai/v1/chat-messages' \ --header 'Authorization: Bearer {api_key}' \ --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" } ] }' ``` ### 2. Describe the feature you'd like to see I'd like to have the `query` field to support list conversations to carry the context (similar to ChatGPT [messages](https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages)), and in this case not using the context information of the dify platform. <img width="644" alt="image" src="https://github.com/langgenius/dify/assets/27820994/e7227f95-75dc-454d-b86d-9e34338c2a3b"> ### 3. How will this feature improve your workflow or experience? a must for customer support, if no workaround is available. ### 4. Additional context or comments _No response_ ### 5. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 17:48:31 -05:00
yindo closed this issue 2026-02-21 17:48:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#2663