Skip to content

Commit 266291e

Browse files
committed
chore: Expose pydantic model from async tool
1 parent a9f8971 commit 266291e

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 (
@@ -147,6 +148,10 @@ def _auth_service_token_getters(self) -> Mapping[str, Callable[[], str]]:
147148
def _client_headers(self) -> Mapping[str, Union[Callable, Coroutine, str]]:
148149
return MappingProxyType(self.__client_headers)
149150

151+
@property
152+
def _pydantic_model(self) -> type[BaseModel]:
153+
return self.__pydantic_model
154+
150155
def __copy(
151156
self,
152157
session: Optional[ClientSession] = None,

0 commit comments

Comments
 (0)