mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 08:12:39 +00:00
moving to dedicated eventlistener
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user