We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c51440c commit 5a1d089Copy full SHA for 5a1d089
common/chat.cpp
@@ -936,7 +936,9 @@ static common_chat_params common_chat_params_init_gpt_oss(const common_chat_temp
936
for (auto msg : inputs.messages) {
937
if (msg.contains("reasoning_content") && msg.at("reasoning_content").is_string()) {
938
msg["thinking"] = msg.at("reasoning_content");
939
- msg.erase("content");
+ if (msg.contains("tool_calls") && msg.at("tool_calls").is_array() && !msg.at("tool_calls").empty()) {
940
+ msg.erase("content");
941
+ }
942
}
943
adjusted_messages.push_back(msg);
944
0 commit comments