From 8dd87f529d1b0e3b16cf7c1e5bdf59bcc3830117 Mon Sep 17 00:00:00 2001 From: vbarda Date: Fri, 20 Dec 2024 09:48:03 -0500 Subject: [PATCH] docs: update custom agent in handoffs doc --- docs/docs/how-tos/agent-handoffs.ipynb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/docs/how-tos/agent-handoffs.ipynb b/docs/docs/how-tos/agent-handoffs.ipynb index d17e12de9..579892208 100644 --- a/docs/docs/how-tos/agent-handoffs.ipynb +++ b/docs/docs/how-tos/agent-handoffs.ipynb @@ -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", @@ -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()" ]