File size: 334 Bytes
dd99f47
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
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)