From d4c84acc39c72dc8e55bf745e5eb041fa926ab57 Mon Sep 17 00:00:00 2001 From: Shivnath Tathe <76526542+shivnathtathe@users.noreply.github.com> Date: Tue, 17 Jun 2025 03:37:18 +0530 Subject: [PATCH] =?UTF-8?q?docs:=20update=20deprecated=20.schema()=20to=20?= =?UTF-8?q?.model=5Fjson=5Fschema()=20in=20tool=5Frun=E2=80=A6=20(#31615)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docs/docs/how_to/tool_runtime.ipynb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs/how_to/tool_runtime.ipynb b/docs/docs/how_to/tool_runtime.ipynb index cc4477e4bb1..a6c46076b30 100644 --- a/docs/docs/how_to/tool_runtime.ipynb +++ b/docs/docs/how_to/tool_runtime.ipynb @@ -182,7 +182,7 @@ } ], "source": [ - "update_favorite_pets.get_input_schema().schema()" + "update_favorite_pets.get_input_schema().model_json_schema()" ] }, { @@ -223,7 +223,7 @@ } ], "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", "\n", "\n", - "update_favorite_pets.get_input_schema().schema()" + "update_favorite_pets.get_input_schema().model_json_schema()" ] }, { @@ -534,7 +534,7 @@ } ], "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", "\n", "\n", - "UpdateFavoritePets().get_input_schema().schema()" + "UpdateFavoritePets().get_input_schema().model_json_schema()" ] }, { @@ -617,7 +617,7 @@ } ], "source": [ - "UpdateFavoritePets().tool_call_schema.schema()" + "UpdateFavoritePets().tool_call_schema.model_json_schema()" ] }, { @@ -659,7 +659,7 @@ " user_to_pets[user_id] = pets\n", "\n", "\n", - "UpdateFavoritePets2().get_input_schema().schema()" + "UpdateFavoritePets2().get_input_schema().model_json_schema()" ] }, { @@ -692,7 +692,7 @@ } ], "source": [ - "UpdateFavoritePets2().tool_call_schema.schema()" + "UpdateFavoritePets2().tool_call_schema.model_json_schema()" ] } ],