[Bugfix] Interleaved thinking keeps compatibility with reasoning_content (#33635)
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com> Co-authored-by: Koushik Dutta <koushd@gmail.com>
This commit is contained in:
@@ -1463,6 +1463,9 @@ def _parse_chat_message_content(
|
|||||||
# Include reasoning if present for interleaved thinking.
|
# Include reasoning if present for interleaved thinking.
|
||||||
if reasoning is not None:
|
if reasoning is not None:
|
||||||
result_msg["reasoning"] = cast(str, reasoning)
|
result_msg["reasoning"] = cast(str, reasoning)
|
||||||
|
result_msg["reasoning_content"] = cast(
|
||||||
|
str, reasoning
|
||||||
|
) # keep compatibility
|
||||||
elif role == "tool":
|
elif role == "tool":
|
||||||
parsed_msg = _ToolParser(message)
|
parsed_msg = _ToolParser(message)
|
||||||
if "tool_call_id" in parsed_msg:
|
if "tool_call_id" in parsed_msg:
|
||||||
|
|||||||
Reference in New Issue
Block a user