Skip to content

Commit b55bf7a

Browse files
committed
chore: Expose pydantic model from async tool
1 parent 3ca2e1e commit b55bf7a

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 (
@@ -119,6 +120,10 @@ def __init__(
119120
# map of client headers to their value/callable/coroutine
120121
self.__client_headers = client_headers
121122

123+
@property
124+
def _pydantic_model(self) -> type[BaseModel]:
125+
return self.__pydantic_model
126+
122127
def __copy(
123128
self,
124129
session: Optional[ClientSession] = None,

0 commit comments

Comments
 (0)