mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Fix type validation in ToolUsageFinishedEvent to accept any result type
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -494,7 +494,7 @@ class ToolUsage:
|
||||
|
||||
def on_tool_use_finished(
|
||||
self, tool: Any, tool_calling: ToolCalling, from_cache: bool, started_at: float,
|
||||
result: Union[str, dict, None] = None
|
||||
result: Any = None
|
||||
) -> None:
|
||||
"""Handle tool usage completion event.
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class ToolUsageFinishedEvent(ToolUsageEvent):
|
||||
started_at: datetime
|
||||
finished_at: datetime
|
||||
from_cache: bool = False
|
||||
result: Union[str, dict, None] = None # Tool execution result
|
||||
result: Any = None # Tool execution result
|
||||
type: str = "tool_usage_finished"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user