From 7b2b6804642cb555d6b06deb09d0e301f23f5897 Mon Sep 17 00:00:00 2001 From: Yx Jiang <2237303+yxjiang@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:51:58 -0700 Subject: [PATCH] Update tool.py Move down ABC. --- polymind/core/tool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polymind/core/tool.py b/polymind/core/tool.py index 25bc6f6..9047b47 100644 --- a/polymind/core/tool.py +++ b/polymind/core/tool.py @@ -96,7 +96,7 @@ def check_type(cls, v: str) -> str: ) -class AbstractTool(BaseModel, ABC): +class AbstractTool(BaseModel): """The base class of the tool. In an agent system, a tool is an object that can be used to perform a task. For example, search for information from the internet, query a database, @@ -258,7 +258,7 @@ def _validate_output_message(self, output_message: Message) -> None: ) -class BaseTool(AbstractTool): +class BaseTool(AbstractTool, ABC): async def __call__(self, input: Message) -> Message: self._validate_input_message(input) output_message = await self._execute(input)