Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify tool use in agent tutorial #4860

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading