server : correct index on finish in OAI completion streams (#20226)

This commit is contained in:
decahedron1
2026-03-08 04:08:57 -05:00
committed by GitHub
parent 213c4a0b81
commit ff52ee964d
+2 -2
View File
@@ -827,7 +827,7 @@ json server_task_result_cmpl_final::to_json_oaicompat_chat_stream() {
{"choices", json::array({
json {
{"finish_reason", nullptr},
{"index", 0},
{"index", index},
{"delta", common_chat_msg_diff_to_json_oaicompat(diff)},
},
})},
@@ -843,7 +843,7 @@ json server_task_result_cmpl_final::to_json_oaicompat_chat_stream() {
{"choices", json::array({
json {
{"finish_reason", finish_reason},
{"index", 0},
{"index", index},
{"delta", json::object()},
},
})},