Skip to content

Commit

Permalink
Clarify tool use in agent tutorial (#4860)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzhu authored Dec 30, 2024
1 parent 156c3f1 commit cc06ec5
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"```{note}\n",
"Unlike in v0.2 AgentChat, the tools are executed by the same agent directly within\n",
"the same call to {py:meth}`~autogen_agentchat.agents.AssistantAgent.on_messages`.\n",
"By default, the agent will return the result of the tool call as the final response.\n",
"```"
]
},
Expand Down Expand Up @@ -205,10 +206,16 @@
"Refer to the documentation from [OpenAI](https://platform.openai.com/docs/guides/function-calling) \n",
"and [Anthropic](https://docs.anthropic.com/en/docs/build-with-claude/tool-use) for more information about tool calling in LLMs.\n",
"\n",
"In AgentChat, the assistant agent can use tools to perform specific actions.\n",
"In AgentChat, the {py:class}`~autogen_agentchat.agents.AssistantAgent` can use tools to perform specific actions.\n",
"The `web_search` tool is one such tool that allows the assistant agent to search the web for information.\n",
"A custom tool can be a Python function or a subclass of the {py:class}`~autogen_core.tools.BaseTool`.\n",
"\n",
"By default, when {py:class}`~autogen_agentchat.agents.AssistantAgent` executes a tool,\n",
"it will return the tool's output as a string in {py:class}`~autogen_agentchat.messages.ToolCallSummaryMessage` in its response.\n",
"If your tool does not return a well-formed string in natural language, you\n",
"can add a reflection step to have the model summarize the tool's output,\n",
"by setting the `reflect_on_tool_use=True` parameter in the {py:class}`~autogen_agentchat.agents.AssistantAgent` constructor.\n",
"\n",
"### Langchain Tools\n",
"\n",
"In addition to custom tools, you can also use tools from the Langchain library\n",
Expand Down Expand Up @@ -412,7 +419,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down

0 comments on commit cc06ec5

Please sign in to comment.