When the API is called, the history session several hours ago cannot be returned properly #3988

Closed
opened 2026-02-21 18:04:15 -05:00 by yindo · 1 comment
Owner

Originally created by @tmkddskf on GitHub (Jun 5, 2024).

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).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.8

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image This conversation was a few hours ago, and when I used this conversation ID, it didn't work.

✔️ Expected Behavior

The model should return normally

Actual Behavior

The model return empty

Originally created by @tmkddskf on GitHub (Jun 5, 2024). ### 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] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.8 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="624" alt="image" src="https://github.com/langgenius/dify/assets/15048044/7bf9e9d5-cb28-4db2-bce9-ab3def970f47"> This conversation was a few hours ago, and when I used this conversation ID, it didn't work. ### ✔️ Expected Behavior The model should return normally ### ❌ Actual Behavior The model return empty
yindo added the 🐞 bug label 2026-02-21 18:04:15 -05:00
yindo closed this issue 2026-02-21 18:04:15 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 5, 2024):

@tmkddskf Hello there! I'm here to help you with any bugs, questions, or contributions while you wait for a human maintainer. Let's tackle this issue together!

The model returns an empty response when using a conversation ID from a few hours ago because the chat list of the current conversation is updated only if the conversation is not new and the conversation ID has not changed recently. If the conversation is new or the conversation ID has changed, the chat list might not be fetched correctly, leading to an empty response.

Additionally, the Conversation class includes properties such as status and is_deleted, which could affect the retrieval of conversation data. If a conversation's status is not 'normal' or if it is marked as deleted, it might not be fetched correctly, resulting in an empty response [1][2][3][4][5].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jun 5, 2024): <!-- Greeting --> @tmkddskf Hello there! I'm here to help you with any bugs, questions, or contributions while you wait for a human maintainer. Let's tackle this issue together! <!-- Answer --> The model returns an empty response when using a conversation ID from a few hours ago because the chat list of the current conversation is updated only if the conversation is not new and the conversation ID has not changed recently. If the conversation is new or the conversation ID has changed, the chat list might not be fetched correctly, leading to an empty response. Additionally, the `Conversation` class includes properties such as `status` and `is_deleted`, which could affect the retrieval of conversation data. If a conversation's status is not 'normal' or if it is marked as deleted, it might not be fetched correctly, resulting in an empty response <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/share/chat/index.tsx)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/api/models/model.py)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/api/controllers/console/app/conversation.py)</sup><sup>[[4]](https://github.com/langgenius/dify/blob/main/api/services/message_service.py)</sup><sup>[[5]](https://github.com/langgenius/dify/blob/main/api/core/app/apps/message_based_app_generator.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#3988