Fix type validation in ToolUsageFinishedEvent to accept any result type

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-03-22 01:06:27 +00:00
parent 7a71a79dae
commit db6dbea091
2 changed files with 2 additions and 2 deletions

View File

@@ -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.

View File

@@ -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"