mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-28 12:35:08 +02:00
docs: update custom agent in handoffs doc (#2846)
This commit is contained in:
@@ -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()"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user