mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-07 15:18:29 +00:00
* sort imports * update --------- Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> Co-authored-by: Eduardo Chiarotti <dudumelgaco@hotmail.com>
25 lines
483 B
Python
25 lines
483 B
Python
from datetime import datetime
|
|
from typing import Any, Dict
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class ToolUsageEvent(BaseModel):
|
|
agent_key: str
|
|
agent_role: str
|
|
tool_name: str
|
|
tool_args: Dict[str, Any]
|
|
tool_class: str
|
|
run_attempts: int | None = None
|
|
delegations: int | None = None
|
|
|
|
|
|
class ToolUsageFinished(ToolUsageEvent):
|
|
started_at: datetime
|
|
finished_at: datetime
|
|
from_cache: bool = False
|
|
|
|
|
|
class ToolUsageError(ToolUsageEvent):
|
|
error: str
|