pub struct CreateEmbeddingResponseUsage {
pub prompt_tokens: u64,
pub total_tokens: u64,
}
Expand description
The usage information for the request.
Fields§
§prompt_tokens: u64
The number of tokens used by the prompt.
total_tokens: u64
The total number of tokens used by the request.
Implementations§
Source§impl CreateEmbeddingResponseUsage
impl CreateEmbeddingResponseUsage
Sourcepub fn builder() -> CreateEmbeddingResponseUsageBuilder<((), ())>
pub fn builder() -> CreateEmbeddingResponseUsageBuilder<((), ())>
Create a builder for building CreateEmbeddingResponseUsage
.
On the builder, call .prompt_tokens(...)
, .total_tokens(...)
to set the values of the fields.
Finally, call .build()
to create the instance of CreateEmbeddingResponseUsage
.
Trait Implementations§
Source§impl Clone for CreateEmbeddingResponseUsage
impl Clone for CreateEmbeddingResponseUsage
Source§fn clone(&self) -> CreateEmbeddingResponseUsage
fn clone(&self) -> CreateEmbeddingResponseUsage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CreateEmbeddingResponseUsage
impl Debug for CreateEmbeddingResponseUsage
Source§impl<'de> Deserialize<'de> for CreateEmbeddingResponseUsage
impl<'de> Deserialize<'de> for CreateEmbeddingResponseUsage
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
Source§impl PartialEq for CreateEmbeddingResponseUsage
impl PartialEq for CreateEmbeddingResponseUsage
Source§fn eq(&self, other: &CreateEmbeddingResponseUsage) -> bool
fn eq(&self, other: &CreateEmbeddingResponseUsage) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Copy for CreateEmbeddingResponseUsage
impl StructuralPartialEq for CreateEmbeddingResponseUsage
Auto Trait Implementations§
impl Freeze for CreateEmbeddingResponseUsage
impl RefUnwindSafe for CreateEmbeddingResponseUsage
impl Send for CreateEmbeddingResponseUsage
impl Sync for CreateEmbeddingResponseUsage
impl Unpin for CreateEmbeddingResponseUsage
impl UnwindSafe for CreateEmbeddingResponseUsage
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