pub struct StepUsage {
pub input_tokens: u64,
pub output_tokens: u64,
pub cached_input_tokens: Option<u64>,
pub tool_calls: usize,
}Expand description
The usage of one model call inside a tool loop (issue #665): the same
three token fields Completion reports, plus how many tool calls that
step’s completion asked for.
Fields§
§input_tokens: u64§output_tokens: u64§cached_input_tokens: Option<u64>The subset of StepUsage::input_tokens served from the provider’s
prompt cache, where it reported one — the same optional fact
Completion::cached_input_tokens carries, never collapsed.
tool_calls: usizeHow many tool calls this step’s completion asked for.
Trait Implementations§
impl Eq for StepUsage
impl StructuralPartialEq for StepUsage
Auto Trait Implementations§
impl Freeze for StepUsage
impl RefUnwindSafe for StepUsage
impl Send for StepUsage
impl Sync for StepUsage
impl Unpin for StepUsage
impl UnsafeUnpin for StepUsage
impl UnwindSafe for StepUsage
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.