pub struct EmbeddingsUsage {
pub prompt_tokens: u32,
pub total_tokens: u32,
}
Expand description
Usage statistics for an embeddings request, if provided by the API.
Fields§
§prompt_tokens: u32
Number of tokens present in the prompt(s).
total_tokens: u32
Total number of tokens consumed by this request.
For embeddings, this is typically the same as prompt_tokens
, unless the API
changes how it reports usage data in the future.
Trait Implementations§
Source§impl Debug for EmbeddingsUsage
impl Debug for EmbeddingsUsage
Source§impl<'de> Deserialize<'de> for EmbeddingsUsage
impl<'de> Deserialize<'de> for EmbeddingsUsage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EmbeddingsUsage
impl RefUnwindSafe for EmbeddingsUsage
impl Send for EmbeddingsUsage
impl Sync for EmbeddingsUsage
impl Unpin for EmbeddingsUsage
impl UnwindSafe for EmbeddingsUsage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more