pub struct EvalRunOutputItemSampleUsage {
pub total_tokens: u64,
pub completion_tokens: u64,
pub prompt_tokens: u64,
pub cached_tokens: u64,
}
Expand description
Token usage details for the sample.
Fields§
§total_tokens: u64
The total number of tokens used.
completion_tokens: u64
The number of completion tokens generated.
prompt_tokens: u64
The number of prompt tokens used.
cached_tokens: u64
The number of tokens retrieved from cache.
Implementations§
Source§impl EvalRunOutputItemSampleUsage
impl EvalRunOutputItemSampleUsage
Sourcepub fn builder() -> EvalRunOutputItemSampleUsageBuilder<((), (), (), ())>
pub fn builder() -> EvalRunOutputItemSampleUsageBuilder<((), (), (), ())>
Create a builder for building EvalRunOutputItemSampleUsage
.
On the builder, call .total_tokens(...)
, .completion_tokens(...)
, .prompt_tokens(...)
, .cached_tokens(...)
to set the values of the fields.
Finally, call .build()
to create the instance of EvalRunOutputItemSampleUsage
.
Trait Implementations§
Source§impl Clone for EvalRunOutputItemSampleUsage
impl Clone for EvalRunOutputItemSampleUsage
Source§fn clone(&self) -> EvalRunOutputItemSampleUsage
fn clone(&self) -> EvalRunOutputItemSampleUsage
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 EvalRunOutputItemSampleUsage
impl Debug for EvalRunOutputItemSampleUsage
Source§impl<'de> Deserialize<'de> for EvalRunOutputItemSampleUsage
impl<'de> Deserialize<'de> for EvalRunOutputItemSampleUsage
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 EvalRunOutputItemSampleUsage
impl PartialEq for EvalRunOutputItemSampleUsage
Source§fn eq(&self, other: &EvalRunOutputItemSampleUsage) -> bool
fn eq(&self, other: &EvalRunOutputItemSampleUsage) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Copy for EvalRunOutputItemSampleUsage
impl StructuralPartialEq for EvalRunOutputItemSampleUsage
Auto Trait Implementations§
impl Freeze for EvalRunOutputItemSampleUsage
impl RefUnwindSafe for EvalRunOutputItemSampleUsage
impl Send for EvalRunOutputItemSampleUsage
impl Sync for EvalRunOutputItemSampleUsage
impl Unpin for EvalRunOutputItemSampleUsage
impl UnwindSafe for EvalRunOutputItemSampleUsage
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