Agent app got incomplete answer in a long conversation #1486

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

Originally created by @zeroameli on GitHub (Mar 21, 2024).

Originally assigned to: @Yeuoly on GitHub.

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.

Provide a description of the help you need

How to reproduce:

  • Create an agent type app and keep talking to it in a conversation until it output an incomplete answer.

Debuging:

Any ideas to solve this problem?

Originally created by @zeroameli on GitHub (Mar 21, 2024). Originally assigned to: @Yeuoly on GitHub. ### 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. ### Provide a description of the help you need How to reproduce: - Create an agent type app and keep talking to it in a conversation until it output an incomplete answer. Debuging: - Agent type app use `assistant_base_runner` to run. According to https://github.com/langgenius/dify/pull/2495, it will take all the history messages as prompt messages. Therefore, prompt messages will become larger and larger when keep talking in a same conversation. - When the prompt_tokens is greater than model_context_tokens, max_tokens will be fixed to 16. It limits the llm model output and result in an incomplete answer. https://github.com/langgenius/dify/blob/16af509c4651f1493fcb59e549bdb984ad54a183/api/core/app_runner/app_runner.py#L114-L115 Any ideas to solve this problem?
yindo closed this issue 2026-02-21 17:34:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1486