When using the dify API, it is impossible to conduct multi-round conversations correctly. #8596

Closed
opened 2026-02-21 18:26:31 -05:00 by yindo · 4 comments
Owner

Originally created by @SodrSnne on GitHub (Feb 25, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • 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).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I have built a job using the dify chatflow.

And set memory in llm node

Image

When I use the web page provided by dify itself, I can normally load the historical messages to the large model.

Image

However, when I used my own developed webpage to call dify's API, it failed to work properly.

Image

api:

Image

✔️ Expected Behavior

No response

Actual Behavior

The checks that I have already completed :

  1. Each time an API request is made, the conversation ID is always included.
    Image
  2. check log :

Image

Image

Image

Image

Originally created by @SodrSnne on GitHub (Feb 25, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [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] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I have built a job using the dify chatflow. And set memory in llm node ![Image](https://github.com/user-attachments/assets/e54ef18f-aec4-4fb0-bfdc-3c813717810a) When I use the web page provided by dify itself, I can normally load the historical messages to the large model. ![Image](https://github.com/user-attachments/assets/5db0cf14-a4b9-4b55-8642-38edf5677766) However, when I used my own developed webpage to call dify's API, it failed to work properly. ![Image](https://github.com/user-attachments/assets/147fa974-e206-4449-89e1-4589f2bce57b) api: ![Image](https://github.com/user-attachments/assets/b9194a77-1f04-4843-bf27-603e34bbed5c) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior The checks that I have already completed : 1. Each time an API request is made, the conversation ID is always included. ![Image](https://github.com/user-attachments/assets/9eec019b-ed28-445c-ad66-5431c59cd189) 2. check log : ![Image](https://github.com/user-attachments/assets/8744b242-38f3-4eb2-8eea-f913324ae919) ![Image](https://github.com/user-attachments/assets/61da8c77-d2a7-49fa-872c-7f4380b9426a) ![Image](https://github.com/user-attachments/assets/b08d7d0c-0621-4099-84aa-9103abc6b5c9) ![Image](https://github.com/user-attachments/assets/0b883143-6956-49d5-bf9e-8725afffdec6)
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 18:26:31 -05:00
yindo closed this issue 2026-02-21 18:26:32 -05:00
Author
Owner

@SodrSnne commented on GitHub (Feb 25, 2025):

What additional information do I still need to provide?

@SodrSnne commented on GitHub (Feb 25, 2025): What additional information do I still need to provide?
Author
Owner

@dosubot[bot] commented on GitHub (Feb 25, 2025):

I found a similar unsolved discussion titled "DIY API interface call, unable to parse context" which might be related to your issue [1].

To resolve the issue of conducting multi-round conversations correctly using the Dify API on your own developed webpage, ensure you are using the updated version of Dify that includes the fix from PR #7955. This update ensures that the 'inputs' field in the /chat-messages API is properly updated with each request, even when using a conversation_id for multiple rounds of conversation.

When starting a new conversation, leave the conversation_id field empty to generate a new one. For subsequent interactions, include the conversation_id to maintain the continuity of the conversation. Ensure that your API calls correctly handle the conversation_id to manage ongoing sessions effectively.

Additionally, be aware that once a conversation_id is generated, future calls to the API should include this conversation_id to ensure the conversation continuity. When a previous conversation_id is passed, any new inputs will be ignored, and only the query is processed for the ongoing conversation. You can also manage dynamic variables during the session using conversation variables to adjust the bot's behavior or responses [2][3][4].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Feb 25, 2025): <!-- Answer --> I found a similar unsolved discussion titled "[DIY API interface call, unable to parse context](https://github.com/langgenius/dify/discussions/10044)" which might be related to your issue <sup>[[1]](https://github.com/langgenius/dify/discussions/10044)</sup>. To resolve the issue of conducting multi-round conversations correctly using the Dify API on your own developed webpage, ensure you are using the updated version of Dify that includes the fix from PR #7955. This update ensures that the 'inputs' field in the /chat-messages API is properly updated with each request, even when using a `conversation_id` for multiple rounds of conversation. When starting a new conversation, leave the `conversation_id` field empty to generate a new one. For subsequent interactions, include the `conversation_id` to maintain the continuity of the conversation. Ensure that your API calls correctly handle the `conversation_id` to manage ongoing sessions effectively. Additionally, be aware that once a `conversation_id` is generated, future calls to the API should include this `conversation_id` to ensure the conversation continuity. When a previous `conversation_id` is passed, any new `inputs` will be ignored, and only the `query` is processed for the ongoing conversation. You can also manage dynamic variables during the session using conversation variables to adjust the bot's behavior or responses <sup>[[2]](https://github.com/langgenius/dify/issues/13588)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/application-publishing/developing-with-apis.md)</sup><sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/en/guides/application-publishing/developing-with-apis.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/47c1713f-054e-4d96-8d1e-16b14b431850?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/47c1713f-054e-4d96-8d1e-16b14b431850?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/47c1713f-054e-4d96-8d1e-16b14b431850?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/47c1713f-054e-4d96-8d1e-16b14b431850?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/47c1713f-054e-4d96-8d1e-16b14b431850?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/47c1713f-054e-4d96-8d1e-16b14b431850?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/47c1713f-054e-4d96-8d1e-16b14b431850?feedback_type=other)</sup>
Author
Owner

@SodrSnne commented on GitHub (Feb 25, 2025):

I saw this post which stated that doify version needs to be rolled back to 0.10.2? But I'm currently using the updated version 0.15.3.

@SodrSnne commented on GitHub (Feb 25, 2025): I saw this post which stated that doify version needs to be rolled back to 0.10.2? But I'm currently using the updated version 0.15.3.
Author
Owner

@crazywoola commented on GitHub (Feb 25, 2025):

@SodrSnne The new configuration only applies for the new conversation.

@crazywoola commented on GitHub (Feb 25, 2025): @SodrSnne The new configuration only applies for the new conversation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8596