From f3cdb201efe7966031524975be511177a3c5d0a8 Mon Sep 17 00:00:00 2001 From: WangxuP <14866506+WangxuP@users.noreply.github.com> Date: Sat, 8 Feb 2025 11:28:32 +0800 Subject: [PATCH] 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 --- examples/server/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 9cdf2058f..e6b592107 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -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 {