In streaming output mode, the content in delta is missing from the second to last data #11746

My solution is to add a default value to the output content
This commit is contained in:
WangxuP 2025-02-08 11:28:32 +08:00 committed by GitHub
parent d2fe216fb2
commit f3cdb201ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -797,7 +797,7 @@ struct server_task_result_cmpl_final : server_task_result {
json choice = json {
{"finish_reason", finish_reason},
{"index", 0},
{"delta", json::object()}
{"delta", json {{"content", ""},}}
};
json ret = json {