Skip to main content

ChatStream

Type Alias ChatStream 

Source
pub type ChatStream = ChatGeneric<ChatChoiceStream>;
Expand description

Streaming chat completion response type (SSE chunks).

Aliased Type§

pub struct ChatStream {
    pub id: String,
    pub choices: Vec<ChatChoiceStream>,
    pub created: u64,
    pub model: String,
    pub system_fingerprint: String,
    pub object: String,
    pub usage: Option<Usage>,
}

Fields§

§id: String

A unique identifier for the chat completion.

§choices: Vec<ChatChoiceStream>§created: u64

The Unix timestamp (in seconds) of when the chat completion was created.

§model: String

The model used for the chat completion.

§system_fingerprint: String

This fingerprint represents the backend configuration that the model runs with.

§object: String

Possible values: [chat.completion]

The object type, which is always chat.completion.

§usage: Option<Usage>

Usage statistics for the completion request.