Skip to main content

ds_api/raw/response/streaming/
chat_completion_chunk.rs

1use serde::Deserialize;
2
3use super::{chunk_choice::ChunkChoice, chunk_object_type::ChunkObjectType};
4use crate::raw::response::non_streaming::Usage;
5
6#[derive(Debug, Deserialize)]
7pub struct ChatCompletionChunk {
8    pub id: String,
9    pub choices: Vec<ChunkChoice>,
10    pub created: u64,
11    pub model: String,
12    pub system_fingerprint: String,
13    #[serde(rename = "object")]
14    pub object: ChunkObjectType,
15    #[serde(default)]
16    pub usage: Option<Usage>,
17}