Skip to content

Commit 89ccd9b

Browse files
committed
chore: Expose pydantic model from async tool
1 parent eb47ebc commit 89ccd9b

File tree

1 file changed

+5
-0
lines changed
  • packages/toolbox-core/src/toolbox_core

1 file changed

+5
-0
lines changed

packages/toolbox-core/src/toolbox_core/tool.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from warnings import warn
2020

2121
from aiohttp import ClientSession
22+
from pydantic import BaseModel
2223

2324
from .protocol import ParameterSchema
2425
from .utils import (
@@ -158,6 +159,10 @@ def _auth_service_token_getters(self) -> Mapping[str, Callable[[], str]]:
158159
def _client_headers(self) -> Mapping[str, Union[Callable, Coroutine, str]]:
159160
return MappingProxyType(self.__client_headers)
160161

162+
@property
163+
def _pydantic_model(self) -> type[BaseModel]:
164+
return self.__pydantic_model
165+
161166
def __copy(
162167
self,
163168
session: Optional[ClientSession] = None,

0 commit comments

Comments
 (0)