fix: SimpleAgent 示例中 tool_registry 初始化顺序修正#711
Open
Zi-Lan-Cui wants to merge 1 commit into
Hidden character warning
The head ref may contain hidden characters: "fix-SimpleAgent-\u793a\u4f8b\u4e2d-tool_registry-\u521d\u59cb\u5316\u987a\u5e8f\u4fee\u6b63"
Open
Conversation
Refactor agent creation to include tool registry.
3 tasks
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.
问题:SimpleAgent 初始化后外部赋 tool_registry 无效,Agent 不具备工具调用能力
示例代码如下:
因为
Simple_Agent初始化时,enable_tool_calling是立刻确定的:所以后续追加tool_registry并不能使模型拥有调用工具的能力,
enable_tool_calling仍为False。