Skip to content

Commit f3cdb20

Browse files
authored
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
1 parent d2fe216 commit f3cdb20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ struct server_task_result_cmpl_final : server_task_result {
797797
json choice = json {
798798
{"finish_reason", finish_reason},
799799
{"index", 0},
800-
{"delta", json::object()}
800+
{"delta", json {{"content", ""},}}
801801
};
802802

803803
json ret = json {

0 commit comments

Comments
 (0)