common : default content to an empty string (#18485)

* common : default content to an empty string

* common : fix tests that break when content != null
This commit is contained in:
Aldehir Rojas
2025-12-30 12:00:57 -06:00
committed by GitHub
parent ac1d0eb7bf
commit 0f89d2ecf1
3 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -319,7 +319,7 @@ json common_chat_msgs_to_json_oaicompat(const std::vector<common_chat_msg> & msg
}
}
} else {
jmsg["content"] = json(); // null
jmsg["content"] = "";
}
if (!msg.reasoning_content.empty()) {
jmsg["reasoning_content"] = msg.reasoning_content;