feat(longtext): implement long text splitting strategy with Markdown …#2038
feat(longtext): implement long text splitting strategy with Markdown …#2038fdc310 wants to merge 2 commits into
Conversation
| quote_origin=quote_origin, | ||
| is_final=is_final, | ||
| ) | ||
| if len(query.resp_message_chain) > 1: |
There was a problem hiding this comment.
这里query.resp_message_chain是不清空的?如果一个query里回复了好几条消息,会导致它重复发好几遍吧?比如在用户一个消息发过来时,local-agent执行了好几轮,那么每一轮都会产生一个回复,每个回复又会被split成好几份;原来的逻辑是只发最后一个resp_message_chain,一个message_chain不会被分割,就没有问题,但现在加了分割,可能就会有问题吧?
There was a problem hiding this comment.
query里为什么会回复好几条消息呢,有一点没有理解到,是相当于在群里,同时好几个人进行询问吗
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
|
recheck |
|
Thank you for your contribution! ❤️ Before we can merge this pull request, we need you to sign the LangBot Contributor License Agreement (CLA). You keep full copyright of your code — the CLA grants us a license to use and distribute your contribution. Signing takes 10 seconds and covers all repositories in this organization, permanently. 感谢您的贡献!合并前请阅读并签署贡献者许可协议(CLA)。您保留代码的全部版权,签署仅需回复下方指定内容,一次签署对本组织全部仓库永久有效。 I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
…awareness
概述 / Overview
新增回复消息切割为多条消息回复逻辑
更改前后对比截图 / Screenshots
检查清单 / Checklist
PR 作者完成 / For PR author
请在方括号间写
x以打勾 / Please tick the box withx项目维护者完成 / For project maintainer