docs: small fixes (#2798)

This commit is contained in:
Vadym Barda
2024-12-17 11:58:38 -05:00
committed by GitHub
parent 83c3f86159
commit 9bd351b80f
2 changed files with 7 additions and 9 deletions
+7 -7
View File
@@ -94,13 +94,13 @@ This is a special case of updating the graph state from tools where in addition
!!! important
If you want to use tools that return `Command`, you can either use prebuilt [`create_react_agent`][langgraph.prebuilt.chat_agent_executor.create_react_agent] / [`ToolNode`][langgraph.prebuilt.tool_node.ToolNode] components, or implement your own tool-executing node that collects `Command` objects returned by the tools and returns a list of them, e.g.:
```python
def call_tools(state):
...
commands = [tools_by_name[tool_call["name"]].invoke(tool_call) for tool_call in tool_calls]
return commands
```
```python
def call_tools(state):
...
commands = [tools_by_name[tool_call["name"]].invoke(tool_call) for tool_call in tool_calls]
return commands
```
Let's now take a closer look at the different multi-agent architectures.
@@ -166,8 +166,6 @@
"\n",
"\n",
"class State(AgentState):\n",
" # user provided\n",
" last_name: str\n",
" # updated by the tool\n",
" user_info: dict[str, Any]\n",
"\n",