Skip to content

Commit 39e4b1d

Browse files
authored
common : fix gpt-oss Jinja error when assistant message has both content and thinking with tool calls (ggml-org#19704)
1 parent 11c325c commit 39e4b1d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

common/chat.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,7 @@ static common_chat_params common_chat_params_init_gpt_oss(const common_chat_temp
20432043
if (has_reasoning_content && has_tool_calls) {
20442044
auto adjusted_message = msg;
20452045
adjusted_message["thinking"] = msg.at("reasoning_content");
2046+
adjusted_message.erase("content");
20462047
adjusted_messages.push_back(adjusted_message);
20472048
} else {
20482049
adjusted_messages.push_back(msg);

0 commit comments

Comments
 (0)