fix: Function calling with duplicate parameter usage, indicating the …#951
Open
1141520944 wants to merge 1 commit intoTencent:mainfrom
Open
fix: Function calling with duplicate parameter usage, indicating the …#9511141520944 wants to merge 1 commit intoTencent:mainfrom
1141520944 wants to merge 1 commit intoTencent:mainfrom
Conversation
…presence of a loop.
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.
Pull Request
描述 (Description)
本 PR 针对 Agent 在 Function Calling 场景下出现“同一工具参数重复调用导致思考循环”的问题,新增并接入工具调用去重保护逻辑。
核心行为是在执行工具前,对当前调用与历史 assistant tool calls、以及当前响应中已出现的 tool calls 做参数语义级比对(基于 JSON 规范化),命中重复时不再实际执行工具,而返回系统提示引导模型调整参数或继续基于已有结果推理。
变更类型 (Type of Change)
影响范围 (Scope)
internal/agent)测试 (Testing)
测试步骤 (Test Steps)
检查清单 (Checklist)
相关 Issue
Fixes #950
截图/录屏 (Screenshots/Recordings)
无(后端逻辑修复)
数据库迁移 (Database Migration)
配置变更 (Configuration Changes)
无配置项变更。
部署说明 (Deployment Notes)
无特殊部署要求,按常规后端发布流程即可。
其他信息 (Additional Information)