mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-31 12:19:58 +02:00
Use create_react_agent (#441)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"id": "8bcd1a3d-7c50-4f58-be4e-1ed654aa33be",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Chat Executor: with tool calling\n",
|
||||
"# ReAct agent with tool calling\n",
|
||||
"\n",
|
||||
"This notebook walks through an example creating a ReAct Agent that uses tool calling.\n",
|
||||
"This is useful for getting started quickly.\n",
|
||||
@@ -32,7 +32,7 @@
|
||||
"source": [
|
||||
"from langchain_openai import ChatOpenAI\n",
|
||||
"from langchain_community.tools.tavily_search import TavilySearchResults\n",
|
||||
"from langgraph.prebuilt import chat_agent_executor\n",
|
||||
"from langgraph.prebuilt import create_react_agent\n",
|
||||
"from langchain_core.messages import HumanMessage"
|
||||
]
|
||||
},
|
||||
@@ -64,7 +64,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"app = chat_agent_executor.create_tool_calling_executor(model, tools)"
|
||||
"app = create_react_agent(model, tools=tools)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -7,9 +7,15 @@
|
||||
"source": [
|
||||
"# (Deprecated) Chat Executor: with function calling\n",
|
||||
"\n",
|
||||
"The function calling executor is deprecated in favor of [create_tool_calling_executor](../chat_agent_executor_with_function_calling/high-level-tools.ipynb).\n",
|
||||
"The function calling executor is deprecated in favor of [create_react_agent](../chat_agent_executor_with_function_calling/high-level-tools.ipynb).\n",
|
||||
"This was done to better align with the underlying model providers' migration from \"function calling\" to \"tool calling\", which typically supports parallel tool usage."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "0a96f735",
|
||||
"metadata": {},
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in New Issue
Block a user