mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 07:35:18 +00:00
docs: update deprecated .schema() to .model_json_schema() in tool_run… (#31615)
This PR updates the tool runtime example notebook to replace the deprecated `.schema()` method with `.model_json_schema()`, aligning it with Pydantic V2. ### 🔧 Changes: - Replaced: ```python update_favorite_pets.get_input_schema().schema() with update_favorite_pets.get_input_schema().model_json_schema() ``` Fixes #31609
This commit is contained in:
parent
b9357d456e
commit
d4c84acc39
@ -182,7 +182,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"update_favorite_pets.get_input_schema().schema()"
|
"update_favorite_pets.get_input_schema().model_json_schema()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -223,7 +223,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"update_favorite_pets.tool_call_schema.schema()"
|
"update_favorite_pets.tool_call_schema.model_json_schema()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -500,7 +500,7 @@
|
|||||||
" user_to_pets[user_id] = pets\n",
|
" user_to_pets[user_id] = pets\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"update_favorite_pets.get_input_schema().schema()"
|
"update_favorite_pets.get_input_schema().model_json_schema()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -534,7 +534,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"update_favorite_pets.tool_call_schema.schema()"
|
"update_favorite_pets.tool_call_schema.model_json_schema()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -583,7 +583,7 @@
|
|||||||
" user_to_pets[user_id] = pets\n",
|
" user_to_pets[user_id] = pets\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"UpdateFavoritePets().get_input_schema().schema()"
|
"UpdateFavoritePets().get_input_schema().model_json_schema()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -617,7 +617,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"UpdateFavoritePets().tool_call_schema.schema()"
|
"UpdateFavoritePets().tool_call_schema.model_json_schema()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -659,7 +659,7 @@
|
|||||||
" user_to_pets[user_id] = pets\n",
|
" user_to_pets[user_id] = pets\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"UpdateFavoritePets2().get_input_schema().schema()"
|
"UpdateFavoritePets2().get_input_schema().model_json_schema()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -692,7 +692,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"UpdateFavoritePets2().tool_call_schema.schema()"
|
"UpdateFavoritePets2().tool_call_schema.model_json_schema()"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user