ds-api 0.10.7

A Rust client library for the DeepSeek API with support for chat completions, streaming, and tools
Documentation
use serde::Deserialize;

#[derive(Debug, Deserialize)]
pub struct Logprobs {
    #[serde(default)]
    pub content: Option<Vec<TokenLogprob>>,
    #[serde(default)]
    pub reasoning_content: Option<Vec<TokenLogprob>>,
}

#[derive(Debug, Deserialize)]
pub struct TokenLogprob {
    pub token: String,
    pub logprob: f32,
    #[serde(default)]
    pub bytes: Option<Vec<u32>>,
    pub top_logprobs: Vec<TopLogprob>,
}

#[derive(Debug, Deserialize)]
pub struct TopLogprob {
    pub token: String,
    pub logprob: f32,
    #[serde(default)]
    pub bytes: Option<Vec<u32>>,
}