Base Tools skeleton
This commit is contained in:
@@ -1,10 +1,19 @@
|
|||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
class BaseTools(ABC):
|
class BaseTools(ABC):
|
||||||
|
"""Abstract base class for tools."""
|
||||||
|
|
||||||
def __init__(self):
|
@abstractmethod
|
||||||
|
def __init__(self) -> None:
|
||||||
|
"""Initialize the tool."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def run(self):
|
def run(self) -> Any:
|
||||||
pass
|
"""Execute the tool's main functionality.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Any: The result of the tool execution
|
||||||
|
"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|||||||
Reference in New Issue
Block a user