pub struct CompletionChunkChoice {
pub delta: ChoiceDelta,
pub index: u32,
pub logprobs: Option<ChoiceLogprobs>,
pub finish_reason: Option<FinishReason>,
pub stop_reason: Option<StopReason>,
pub token_ids: Option<Vec<u32>>,
}Fields§
§delta: ChoiceDeltaA chat completion delta generated by streamed model responses.
index: u32The index of the choice in the list of choices.
logprobs: Option<ChoiceLogprobs>Log probability information for the choice.
finish_reason: Option<FinishReason>The reason the model stopped generating tokens.
This will be stop if the model hit a natural stop point or a provided stop
sequence, length if the maximum number of tokens specified in the request was
reached, content_filter if content was omitted due to a flag from our content
filters, tool_calls if the model called a tool, or function_call
(deprecated) if the model called a function.
stop_reason: Option<StopReason>vLLM: which terminator ended generation — the matched stop string, or the matched token ID. Not part of the OpenAI chunk schema.
token_ids: Option<Vec<u32>>vLLM: the generated token IDs for this chunk. Only set when the
request set vllm_chat.return_token_ids.