pub struct Used {
pub input: Tokens,
pub output: Tokens,
pub cached: Tokens,
pub cache_write: Option<Tokens>,
}Expand description
What one turn cost in tokens.
Absolute counts and no ratio: the numerator is on the wire and the
denominator - this model’s context window - is not. A percentage with
no denominator is the thing UnplannedProgress already refuses to
spell, and it would be no more honest here.
Fields§
§input: Tokens§output: Tokens§cached: TokensThe part of input read from the provider’s cache
(kernel::ModelUsage::cache_read_tokens).
cache_write: Option<Tokens>The part of input written into the provider’s cache
(kernel::ModelUsage::cache_write_tokens), priced apart from a
read. Always present beside the other three in this build; absent
only in a frame from a city written before it was answered
(crates/wire/Spec.lean D13).
Trait Implementations§
impl Copy for Used
Source§impl<'de> Deserialize<'de> for Used
impl<'de> Deserialize<'de> for Used
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
impl Eq for Used
impl StructuralPartialEq for Used
Auto Trait Implementations§
impl Freeze for Used
impl RefUnwindSafe for Used
impl Send for Used
impl Sync for Used
impl Unpin for Used
impl UnsafeUnpin for Used
impl UnwindSafe for Used
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