pub struct InferenceUsageRecord {
pub kind: InferenceKind,
pub stage: String,
pub iteration: usize,
pub provider: String,
pub model: String,
pub prompt_tokens: usize,
pub completion_tokens: usize,
pub cached_tokens: usize,
pub cache_write_tokens: usize,
pub at: i64,
}Expand description
One provider call’s cost, as folded out of the journal.
The flattened form of RunRecord::InferenceUsage, so a consumer walking a
folded run does not have to match the record enum to read a number.
Fields§
§kind: InferenceKindWhich kind of call this was.
stage: StringThe stage the run was in, empty for the title call.
iteration: usizeThe stage-local iteration index.
provider: StringThe provider that served the call.
model: StringThe model the call targeted.
prompt_tokens: usizePrompt tokens billed.
completion_tokens: usizeCompletion tokens billed.
cached_tokens: usizeTokens read from provider cache.
cache_write_tokens: usizeTokens written to provider cache.
at: i64Unix seconds.
Trait Implementations§
Source§impl Clone for InferenceUsageRecord
impl Clone for InferenceUsageRecord
Source§fn clone(&self) -> InferenceUsageRecord
fn clone(&self) -> InferenceUsageRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InferenceUsageRecord
impl Debug for InferenceUsageRecord
impl Eq for InferenceUsageRecord
Source§impl PartialEq for InferenceUsageRecord
impl PartialEq for InferenceUsageRecord
impl StructuralPartialEq for InferenceUsageRecord
Auto Trait Implementations§
impl Freeze for InferenceUsageRecord
impl RefUnwindSafe for InferenceUsageRecord
impl Send for InferenceUsageRecord
impl Sync for InferenceUsageRecord
impl Unpin for InferenceUsageRecord
impl UnsafeUnpin for InferenceUsageRecord
impl UnwindSafe for InferenceUsageRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.