diff --git a/router/src/lib.rs b/router/src/lib.rs index 64f0fafa..50d2cbf4 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -524,7 +524,6 @@ impl ChatCompletionChunk { delta: Option, tool_calls: Option>, created: u64, - index: u32, logprobs: Option, finish_reason: Option, ) -> Self { @@ -535,12 +534,12 @@ impl ChatCompletionChunk { model, system_fingerprint, choices: vec![ChatCompletionChoice { - index, + index: 0, delta: ChatCompletionDelta { role: "assistant".to_string(), content: delta, tool_calls: tool_calls.map(|tc| DeltaToolCall { - index, + index: 0, id: String::new(), r#type: "function".to_string(), function: Function { diff --git a/router/src/server.rs b/router/src/server.rs index 61aacd0b..c8e6017a 100644 --- a/router/src/server.rs +++ b/router/src/server.rs @@ -895,7 +895,6 @@ async fn chat_completions( content, tool_calls, current_time, - stream_token.index, logprobs, stream_token.details.map(|d| d.finish_reason.to_string()), ))