From 690b2407343e8d34a9943a7cc87bff20059c3d61 Mon Sep 17 00:00:00 2001 From: caohao Date: Tue, 24 Feb 2026 22:46:06 +0800 Subject: [PATCH] fix chapter7 register_function call issue --- code/chapter7/test_react_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/chapter7/test_react_agent.py b/code/chapter7/test_react_agent.py index b8cdf930..de3f4081 100644 --- a/code/chapter7/test_react_agent.py +++ b/code/chapter7/test_react_agent.py @@ -101,7 +101,7 @@ def test_custom_prompt(): # 注册计算器工具 try: from hello_agents import calculate - tool_registry.register_function("calculate", calculate, "数学计算工具") + tool_registry.register_function("calculate", "数学计算工具", calculate) except ImportError: pass