mirror of
https://github.com/hwchase17/langchain
synced 2024-11-02 09:40:22 +00:00
docs: sql_qa.ipynb tutorial update (#21756)
1. Updated deprecated method usage. 2. Added LangGraph required installation in tutorial. X: MichaelOzery
This commit is contained in:
parent
d77e60a7f4
commit
dda5a9c97a
@ -458,7 +458,22 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"### Initializing agent\n",
|
"### Initializing agent\n",
|
||||||
"\n",
|
"First, get required package **LangGraph**"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"%pip install --upgrade --quiet langgraph"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
"We will use a prebuilt [LangGraph](/docs/concepts/#langgraph) agent to build our agent"
|
"We will use a prebuilt [LangGraph](/docs/concepts/#langgraph) agent to build our agent"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -472,7 +487,7 @@
|
|||||||
"from langgraph.prebuilt import chat_agent_executor\n",
|
"from langgraph.prebuilt import chat_agent_executor\n",
|
||||||
"\n",
|
"\n",
|
||||||
"agent_executor = chat_agent_executor.create_tool_calling_executor(\n",
|
"agent_executor = chat_agent_executor.create_tool_calling_executor(\n",
|
||||||
" llm, tools, system_message=system_message\n",
|
" llm, tools, messages_modifier=system_message\n",
|
||||||
")"
|
")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -711,7 +726,7 @@
|
|||||||
"system_message = SystemMessage(content=system)\n",
|
"system_message = SystemMessage(content=system)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"agent = chat_agent_executor.create_tool_calling_executor(\n",
|
"agent = chat_agent_executor.create_tool_calling_executor(\n",
|
||||||
" llm, tools, system_message=system_message\n",
|
" llm, tools, messages_modifier=system_message\n",
|
||||||
")"
|
")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user