From 273b2fe81ed9479f513af27a44274600120480b0 Mon Sep 17 00:00:00 2001 From: Saeed Hassanvand <13480810+SaeedHassanvand@users.noreply.github.com> Date: Thu, 2 Jan 2025 20:52:29 +0330 Subject: [PATCH] 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()`. --- docs/docs/how_to/custom_tools.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/how_to/custom_tools.ipynb b/docs/docs/how_to/custom_tools.ipynb index 8becb03c7c9..4225569ab61 100644 --- a/docs/docs/how_to/custom_tools.ipynb +++ b/docs/docs/how_to/custom_tools.ipynb @@ -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())" ] }, {