mirror of
https://github.com/microsoft/autogen.git
synced 2025-12-26 14:38:50 +00:00
docs: enhance Swarm user guide with notes on tool calling (#5103)
This commit is contained in:
parent
11461b75a2
commit
8df86e2b72
@ -9,7 +9,7 @@
|
||||
"{py:class}`~autogen_agentchat.teams.Swarm` implements a team in which agents can hand off \n",
|
||||
"task to other agents based on their capabilities. \n",
|
||||
"It is a multi-agent design pattern first introduced by OpenAI in \n",
|
||||
"[an experimental project](https://github.com/openai/swarm).\n",
|
||||
"[Swarm](https://github.com/openai/swarm).\n",
|
||||
"The key idea is to let agent delegate tasks to other agents using a special tool call, while\n",
|
||||
"all agents share the same message context.\n",
|
||||
"This enables agents to make local decisions about task planning, rather than\n",
|
||||
@ -50,6 +50,17 @@
|
||||
"3. When an agent generates a {py:class}`~autogen_agentchat.messages.HandoffMessage`, the receiving agent takes over the task with the same message context.\n",
|
||||
"4. The process continues until a termination condition is met.\n",
|
||||
"\n",
|
||||
"```{note}\n",
|
||||
"The {py:class}`~autogen_agentchat.agents.AssistantAgent` uses the tool calling\n",
|
||||
"capability of the model to generate handoffs. This means that the model must\n",
|
||||
"support tool calling. If the model does parallel tool calling, multiple handoffs\n",
|
||||
"may be generated at the same time. This can lead to unexpected behavior.\n",
|
||||
"To avoid this, you can disable parallel tool calling by configuring the model\n",
|
||||
"client. For {py:class}`~autogen_ext.models.openai.OpenAIChatCompletionClient`\n",
|
||||
"and {py:class}`~autogen_ext.models.openai.AzureOpenAIChatCompletionClient`,\n",
|
||||
"you can set `parallel_tool_calls=False` in the configuration.\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"In this section, we will show you two examples of how to use the {py:class}`~autogen_agentchat.teams.Swarm` team:\n",
|
||||
"\n",
|
||||
"1. A customer support team with human-in-the-loop handoff.\n",
|
||||
@ -524,7 +535,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.5"
|
||||
"version": "3.12.7"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user