[Misc] Remove tool name from warn logs (#59294)
Signed-off-by: Benjamin Merkel <benjamin.merkel@tngtech.com> Co-authored-by: Benjamin Merkel <benjamin.merkel@tngtech.com> Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
This commit is contained in:
co-authored by
Benjamin Merkel
Chauncey
parent
efad400092
commit
bf6c80c7e8
@@ -720,10 +720,9 @@ def _postprocess_messages(messages: list[ConversationMessage]) -> None:
|
||||
# leave the conversation unrecoverable. Coerce
|
||||
# to an empty object so the turn can proceed.
|
||||
logger.warning(
|
||||
"Tool call %r has arguments that are not valid "
|
||||
"Tool call has arguments that are not valid "
|
||||
"JSON (%d chars); coercing to an empty object "
|
||||
"so the conversation can continue.",
|
||||
function.get("name"),
|
||||
len(content),
|
||||
)
|
||||
parsed = None
|
||||
@@ -736,9 +735,8 @@ def _postprocess_messages(messages: list[ConversationMessage]) -> None:
|
||||
# "42", "true").
|
||||
# Chat templates require a mapping.
|
||||
logger.warning(
|
||||
"Tool call %r arguments decoded to %s, not a "
|
||||
"Tool call arguments decoded to %s, not a "
|
||||
"JSON object; coercing to an empty object.",
|
||||
function.get("name"),
|
||||
type(parsed).__name__,
|
||||
)
|
||||
parsed = {}
|
||||
|
||||
Reference in New Issue
Block a user