Spaces:
Sleeping
Sleeping
File size: 513 Bytes
19e2683 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from abc import ABC, abstractmethod
from ci_triage_env.schemas.episode import StepRecord
from ci_triage_env.schemas.scenario import Scenario, ToolOutput
class ToolHandler(ABC):
name: str
cost_unit: float
@abstractmethod
def call(
self,
args: dict,
scenario: Scenario,
history: list[StepRecord],
) -> ToolOutput: ...
@abstractmethod
def validate_args(self, args: dict) -> None:
"""Raise ValueError if args don't match this tool's schema."""
|