From 63eaf3dcf08ed0728d26dcb373f2eeb55cdd4aef Mon Sep 17 00:00:00 2001 From: Twisha Bansal <58483338+twishabansal@users.noreply.github.com> Date: Thu, 27 Feb 2025 12:25:52 +0530 Subject: [PATCH 1/2] chore: allow dict input for Tool Schema --- src/toolbox_langchain/async_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/toolbox_langchain/async_tools.py b/src/toolbox_langchain/async_tools.py index 998580d4..dc946dee 100644 --- a/src/toolbox_langchain/async_tools.py +++ b/src/toolbox_langchain/async_tools.py @@ -42,7 +42,7 @@ class AsyncToolboxTool(BaseTool): def __init__( self, name: str, - schema: ToolSchema, + schema: ToolSchema | dict, url: str, session: ClientSession, auth_tokens: dict[str, Callable[[], str]] = {}, From 61abaf328200a844fe49e5fef48b53b8d8ee5544 Mon Sep 17 00:00:00 2001 From: Twisha Bansal <58483338+twishabansal@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:09:08 +0530 Subject: [PATCH 2/2] fix to use with python 3.9 --- src/toolbox_langchain/async_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/toolbox_langchain/async_tools.py b/src/toolbox_langchain/async_tools.py index dc946dee..16b52ee0 100644 --- a/src/toolbox_langchain/async_tools.py +++ b/src/toolbox_langchain/async_tools.py @@ -42,7 +42,7 @@ class AsyncToolboxTool(BaseTool): def __init__( self, name: str, - schema: ToolSchema | dict, + schema: Union[ToolSchema, dict], url: str, session: ClientSession, auth_tokens: dict[str, Callable[[], str]] = {},