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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View file

@ -650,7 +650,7 @@ static void test_msgs_oaicompat_json_conversion() {
"[\n"
" {\n"
" \"role\": \"assistant\",\n"
" \"content\": null,\n"
" \"content\": \"\",\n"
" \"tool_calls\": [\n"
" {\n"
" \"type\": \"function\",\n"
@ -906,7 +906,8 @@ static void test_template_output_parsers() {
" },\n"
" \"id\": \"123456789\"\n"
" }\n"
" ]\n"
" ],\n"
" \"content\": \"\"\n"
"}");
}
{
@ -1713,7 +1714,8 @@ static void test_template_output_parsers() {
" },\n"
" \"id\": \"123456789\"\n"
" }\n"
" ]\n"
" ],\n"
" \"content\": \"\"\n"
"}",
/* expect_grammar_triggered= */ false
);