feat: add tool error logging (#1804)

This commit is contained in:
danilbogdan
2025-11-18 09:26:28 +01:00
committed by GitHub
parent e3fe4f4abb
commit 9bcf0817ef
+7
View File
@@ -645,6 +645,13 @@ def function_tool(
},
)
)
if _debug.DONT_LOG_TOOL_DATA:
logger.debug(f"Tool {schema.name} failed")
else:
logger.error(
f"Tool {schema.name} failed: {input} {e}",
exc_info=e,
)
return result
return FunctionTool(