diff --git a/code/chapter7/my_simple_agent.py b/code/chapter7/my_simple_agent.py index 1a112585..a54ce4fe 100644 --- a/code/chapter7/my_simple_agent.py +++ b/code/chapter7/my_simple_agent.py @@ -1,6 +1,6 @@ # my_simple_agent.py from typing import Optional, Iterator -from hello_agents import SimpleAgent, HelloAgentsLLM, Config, Message +from hello_agents import SimpleAgent, HelloAgentsLLM, Config, Message, ToolRegistry import re class MySimpleAgent(SimpleAgent): diff --git a/docs/chapter7/Chapter7-Building-Your-Agent-Framework.md b/docs/chapter7/Chapter7-Building-Your-Agent-Framework.md index 2f5a2894..eb6a115d 100644 --- a/docs/chapter7/Chapter7-Building-Your-Agent-Framework.md +++ b/docs/chapter7/Chapter7-Building-Your-Agent-Framework.md @@ -617,7 +617,7 @@ SimpleAgent is the most basic Agent implementation, demonstrating how to build a ```python # my_simple_agent.py from typing import Optional, Iterator -from hello_agents import SimpleAgent, HelloAgentsLLM, Config, Message +from hello_agents import SimpleAgent, HelloAgentsLLM, Config, Message, ToolRegistry class MySimpleAgent(SimpleAgent): """ diff --git "a/docs/chapter7/\347\254\254\344\270\203\347\253\240 \346\236\204\345\273\272\344\275\240\347\232\204Agent\346\241\206\346\236\266.md" "b/docs/chapter7/\347\254\254\344\270\203\347\253\240 \346\236\204\345\273\272\344\275\240\347\232\204Agent\346\241\206\346\236\266.md" index 2b14bb15..703a4cd9 100644 --- "a/docs/chapter7/\347\254\254\344\270\203\347\253\240 \346\236\204\345\273\272\344\275\240\347\232\204Agent\346\241\206\346\236\266.md" +++ "b/docs/chapter7/\347\254\254\344\270\203\347\253\240 \346\236\204\345\273\272\344\275\240\347\232\204Agent\346\241\206\346\236\266.md" @@ -617,7 +617,7 @@ SimpleAgent是最基础的Agent实现,它展示了如何在框架基础上构 ```python # my_simple_agent.py from typing import Optional, Iterator -from hello_agents import SimpleAgent, HelloAgentsLLM, Config, Message +from hello_agents import SimpleAgent, HelloAgentsLLM, Config, Message, ToolRegistry class MySimpleAgent(SimpleAgent): """