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:
Saeed Hassanvand 2025-01-02 20:52:29 +03:30 committed by GitHub
parent a092f5a607
commit 273b2fe81e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -169,7 +169,7 @@
" return a * max(b)\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",
"\n",
"\n",
"foo.args_schema.schema()"
"print(foo.args_schema.model_json_schema())"
]
},
{