[Misc] Print stack trace using logger.exception (#9461)
This commit is contained in:
@@ -103,9 +103,9 @@ class Hermes2ProToolParser(ToolParser):
|
||||
tool_calls=tool_calls,
|
||||
content=content if content else None)
|
||||
|
||||
except Exception as e:
|
||||
logger.error("Error in extracting tool call from response %s",
|
||||
e)
|
||||
except Exception:
|
||||
logger.exception(
|
||||
"Error in extracting tool call from response.")
|
||||
return ExtractedToolCallInformation(tools_called=False,
|
||||
tool_calls=[],
|
||||
content=model_output)
|
||||
@@ -333,6 +333,6 @@ class Hermes2ProToolParser(ToolParser):
|
||||
|
||||
return delta
|
||||
|
||||
except Exception as e:
|
||||
logger.error("Error trying to handle streaming tool call: %s", e)
|
||||
except Exception:
|
||||
logger.exception("Error trying to handle streaming tool call.")
|
||||
return None # do not stream a delta. skip this token ID.
|
||||
|
||||
Reference in New Issue
Block a user