moving to dedicated eventlistener

This commit is contained in:
Lorenze Jay
2025-02-14 14:49:34 -08:00
parent fe7c8b2049
commit 6eab0e3d3b
9 changed files with 82 additions and 57 deletions

View File

@@ -18,6 +18,12 @@ class ToolUsageEvent(CrewEvent):
model_config = {"arbitrary_types_allowed": True}
class ToolUsageStartedEvent(ToolUsageEvent):
"""Event emitted when a tool execution is started"""
type: str = "tool_usage_started"
class ToolUsageFinishedEvent(ToolUsageEvent):
"""Event emitted when a tool execution is completed"""
@@ -30,5 +36,5 @@ class ToolUsageFinishedEvent(ToolUsageEvent):
class ToolUsageErrorEvent(ToolUsageEvent):
"""Event emitted when a tool execution encounters an error"""
error: str
error: Any
type: str = "tool_usage_error"