feat: add tool error logging (#1804)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user