pub type StreamingChatResponse = ChatResponse<ChatChoiceDelta>;Expand description
A chunk of streaming response
Aliased Type§
pub struct StreamingChatResponse {
pub created: u64,
pub model: Option<String>,
pub system_fingerprint: Option<String>,
pub choices: Vec<ChatChoiceDelta>,
pub usage: Option<UsageResponse>,
}Fields§
§created: u64Unix timestamp in seconds
model: Option<String>The model that was used
system_fingerprint: Option<String>A fingerprint for the system prompt
choices: Vec<ChatChoiceDelta>The chat choices
usage: Option<UsageResponse>Token usage information
Trait Implementations§
Source§impl From<ChatResponse<ChatChoice>> for StreamingChatResponse
For when we need to make a non-streaming chat response appear like it was a streaming response
impl From<ChatResponse<ChatChoice>> for StreamingChatResponse
For when we need to make a non-streaming chat response appear like it was a streaming response
Source§fn from(value: SingleChatResponse) -> Self
fn from(value: SingleChatResponse) -> Self
Converts to this type from the input type.