Spaces:
Sleeping
Sleeping
| """Abstract base class for all assistant tools.""" | |
| from __future__ import annotations | |
| from abc import ABC, abstractmethod | |
| from dataclasses import dataclass, field | |
| class ToolResult: | |
| tool_name: str | |
| query: str | |
| output: str | |
| success: bool | |
| error: str | None = None | |
| class BaseTool(ABC): | |
| def name(self) -> str: ... | |
| def description(self) -> str: ... | |
| def usage_pattern(self) -> str: ... | |
| def execute(self, query: str) -> ToolResult: ... | |