Fix type checker errors in on_tool_use call

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-04-10 16:31:55 +00:00
parent 77ed11898b
commit 84a16abb4a

View File

@@ -247,7 +247,7 @@ class ToolUsage:
if self.tools_handler:
should_cache = True
if (
if available_tool is not None and (
hasattr(available_tool, "cache_function")
and available_tool.cache_function
):
@@ -255,8 +255,9 @@ class ToolUsage:
calling.arguments, result
)
output_result = "" if result is None else result
self.tools_handler.on_tool_use(
calling=calling, output=result, should_cache=should_cache
calling=calling, output=output_result, should_cache=should_cache
)
self._telemetry.tool_usage(
llm=self.function_calling_llm,