Skip to content

Commit

Permalink
docs: update custom agent in handoffs doc
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarda committed Dec 20, 2024
1 parent d0278f5 commit 8dd87f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/docs/how-tos/agent-handoffs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,7 @@
"\n",
" tool_response = tool_.invoke(tool_call)\n",
" if isinstance(tool_response, ToolMessage):\n",
" results.append(\n",
" Command(goto=\"call_model\", update={\"messages\": [tool_response]})\n",
" )\n",
" results.append(Command(update={\"messages\": [tool_response]}))\n",
"\n",
" # handle tools that return Command directly\n",
" elif isinstance(tool_response, Command):\n",
Expand All @@ -531,6 +529,7 @@
" graph.add_node(call_model)\n",
" graph.add_node(call_tools)\n",
" graph.add_edge(START, \"call_model\")\n",
" graph.add_edge(\"call_tools\", \"call_model\")\n",
"\n",
" return graph.compile()"
]
Expand Down

0 comments on commit 8dd87f5

Please sign in to comment.