File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
pydantic_ai_slim/pydantic_ai Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 77from pydantic import GetCoreSchemaHandler , GetJsonSchemaHandler
88from pydantic .json_schema import JsonSchemaValue
99from pydantic_core import core_schema
10- from typing_extensions import TypeAliasType , TypeVar
10+ from typing_extensions import TypeAliasType , TypeVar , deprecated
1111
1212from . import _utils
1313from .messages import ToolCallPart
14- from .tools import RunContext
14+ from .tools import RunContext , ToolDefinition
1515
1616__all__ = (
1717 # classes
@@ -368,3 +368,16 @@ class DeferredToolRequests:
368368 """Tool calls that require external execution."""
369369 approvals : list [ToolCallPart ] = field (default_factory = list )
370370 """Tool calls that require human-in-the-loop approval."""
371+
372+
373+ @deprecated ('`DeferredToolCalls` is deprecated, use `DeferredToolRequests` instead' )
374+ class DeferredToolCalls (DeferredToolRequests ): # pragma: no cover
375+ @property
376+ @deprecated ('`DeferredToolCalls.tool_calls` is deprecated, use `DeferredToolRequests.calls` instead' )
377+ def tool_calls (self ) -> list [ToolCallPart ]:
378+ return self .calls
379+
380+ @property
381+ @deprecated ('`DeferredToolCalls.tool_defs` is deprecated' )
382+ def tool_defs (self ) -> dict [str , ToolDefinition ]:
383+ return {}
Original file line number Diff line number Diff line change @@ -47,6 +47,6 @@ async def call_tool(
4747 raise NotImplementedError ('External tools cannot be called directly' )
4848
4949
50- @deprecated ('`DeferredToolset` was renamed to `ExternalToolset`' )
50+ @deprecated ('`DeferredToolset` is deprecated, use `ExternalToolset` instead ' )
5151class DeferredToolset (ExternalToolset ):
5252 """Deprecated alias for `ExternalToolset`."""
You can’t perform that action at this time.
0 commit comments