server : correct index on finish in OAI completion streams (#20226)
This commit is contained in:
parent
213c4a0b81
commit
ff52ee964d
|
|
@ -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()},
|
||||
},
|
||||
})},
|
||||
|
|
|
|||
Loading…
Reference in New Issue