pinecone-sdk 0.1.2

Pinecone Rust SDK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::openapi::models::EmbeddingsListUsage as OpenApiEmbeddingsListUsage;

/// EmbeddingsListUsage : Usage statistics for model inference including any instruction prefixes
#[derive(Clone, Default, Debug, PartialEq)]
pub struct EmbeddingsListUsage {
    /// The total number of tokens processed.
    pub total_tokens: i32,
}

impl From<OpenApiEmbeddingsListUsage> for EmbeddingsListUsage {
    fn from(openapi_model: OpenApiEmbeddingsListUsage) -> Self {
        EmbeddingsListUsage {
            total_tokens: openapi_model.total_tokens.unwrap_or(0),
        }
    }
}