FD900's picture
Create tools/tool_base.py
dd99f47 verified
raw
history blame
334 Bytes
class BaseTool:
name: str = "base_tool"
description: str = "Base class for tools."
inputs: dict = {}
output_type: str = "string"
def forward(self, **kwargs):
raise NotImplementedError("Each tool must implement a `forward` method.")
def __call__(self, **kwargs):
return self.forward(**kwargs)