mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +00:00
Fix index in chat completion chunk
This commit is contained in:
parent
0d9917f744
commit
9a12e141d7
@ -524,7 +524,6 @@ impl ChatCompletionChunk {
|
||||
delta: Option<String>,
|
||||
tool_calls: Option<Vec<String>>,
|
||||
created: u64,
|
||||
index: u32,
|
||||
logprobs: Option<ChatCompletionLogprobs>,
|
||||
finish_reason: Option<String>,
|
||||
) -> Self {
|
||||
@ -535,7 +534,7 @@ impl ChatCompletionChunk {
|
||||
model,
|
||||
system_fingerprint,
|
||||
choices: vec![ChatCompletionChoice {
|
||||
index,
|
||||
index: 0,
|
||||
delta: ChatCompletionDelta {
|
||||
role: "assistant".to_string(),
|
||||
content: delta,
|
||||
|
@ -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()),
|
||||
))
|
||||
|
Loading…
Reference in New Issue
Block a user