ds-api 0.10.7

A Rust client library for the DeepSeek API with support for chat completions, streaming, and tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::Deserialize;

use super::{chunk_choice::ChunkChoice, chunk_object_type::ChunkObjectType};
use crate::raw::response::non_streaming::Usage;

#[derive(Debug, Deserialize)]
pub struct ChatCompletionChunk {
    pub id: String,
    pub choices: Vec<ChunkChoice>,
    pub created: u64,
    pub model: String,
    #[serde(default)]
    pub system_fingerprint: Option<String>,
    #[serde(rename = "object")]
    pub object: ChunkObjectType,
    #[serde(default)]
    pub usage: Option<Usage>,
}