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

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()},
},
})},