feat(longtext): implement long text splitting strategy with Markdown …#2038
Open
feat(longtext): implement long text splitting strategy with Markdown …#2038
Conversation
RockChinQ
reviewed
Mar 9, 2026
| quote_origin=quote_origin, | ||
| is_final=is_final, | ||
| ) | ||
| if len(query.resp_message_chain) > 1: |
Member
There was a problem hiding this comment.
这里query.resp_message_chain是不清空的?如果一个query里回复了好几条消息,会导致它重复发好几遍吧?比如在用户一个消息发过来时,local-agent执行了好几轮,那么每一轮都会产生一个回复,每个回复又会被split成好几份;原来的逻辑是只发最后一个resp_message_chain,一个message_chain不会被分割,就没有问题,但现在加了分割,可能就会有问题吧?
Member
Author
There was a problem hiding this comment.
query里为什么会回复好几条消息呢,有一点没有理解到,是相当于在群里,同时好几个人进行询问吗
Member
There was a problem hiding this comment.
工具调用啊,agent循环,比如我让它去查询一个数据表,他就会回复:
1. 调用工具前回复一条“我将要调用工具”
2. 调用工具的记录一条
3. 完成后根据工具返回值回复“我查到了xxxx”
这样一次用户消息就有好几条回复的
Use query variable '_longtext_split_extra_chains' to pass extra split segments instead of appending to resp_message_chain directly. This prevents agent tool-call multi-round responses from being misidentified as split results and sent repeatedly. respback.py reverts to original single-chain logic and appends split extra chains after the main response.
3c1012f to
662e6a4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…awareness
概述 / Overview
新增回复消息切割为多条消息回复逻辑
更改前后对比截图 / Screenshots
检查清单 / Checklist
PR 作者完成 / For PR author
请在方括号间写
x以打勾 / Please tick the box withx项目维护者完成 / For project maintainer