mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-06 17:57:49 +02:00
docs: update pydantic comments -> callouts in tutorials (#1825)
This commit is contained in:
@@ -2039,6 +2039,19 @@
|
||||
"Next, define a schema to show the model to let it decide to request assistance."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7bd3d704-5bee-4872-8d12-992bc970c158",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<div class=\"admonition note\">\n",
|
||||
" <p class=\"admonition-title\">Using Pydantic with LangChain</p>\n",
|
||||
" <p>\n",
|
||||
" This notebook uses Pydantic v2 <code>BaseModel</code>, which requires <code>langchain-core >= 0.3</code>. Using <code>langchain-core < 0.3</code> will result in errors due to mixing of Pydantic v1 and v2 <code>BaseModels</code>.\n",
|
||||
" </p>\n",
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
@@ -2046,7 +2059,6 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# NOTE: you must use langchain-core >= 0.3 with Pydantic v2\n",
|
||||
"from pydantic import BaseModel\n",
|
||||
"\n",
|
||||
"class RequestAssistance(BaseModel):\n",
|
||||
|
||||
Reference in New Issue
Block a user