mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-27 21:45:08 +00:00
docs: Remove deprecated schema()
usage in examples (#28956)
This pull request updates the documentation in `docs/docs/how_to/custom_tools.ipynb` to reflect the recommended approach for generating JSON schemas in Pydantic. Specifically, it replaces instances of the deprecated `schema()` method with the newer and more versatile `model_json_schema()`.
This commit is contained in:
parent
a092f5a607
commit
273b2fe81e
@ -169,7 +169,7 @@
|
|||||||
" return a * max(b)\n",
|
" return a * max(b)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"multiply_by_max.args_schema.schema()"
|
"print(multiply_by_max.args_schema.model_json_schema())"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -285,7 +285,7 @@
|
|||||||
" return bar\n",
|
" return bar\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"foo.args_schema.schema()"
|
"print(foo.args_schema.model_json_schema())"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user