pub struct ContextEstimate {
pub tokens: u64,
pub usage_tokens: u64,
pub trailing_tokens: u64,
pub last_usage_index: Option<usize>,
}Expand description
Estimated context size: the last valid usage plus estimates for what follows.
Fields§
§tokens: u64Total tokens.
usage_tokens: u64Tokens from the last usage.
trailing_tokens: u64Estimated tokens after it.
last_usage_index: Option<usize>Index of the message whose usage was used.
Trait Implementations§
Source§impl Clone for ContextEstimate
impl Clone for ContextEstimate
impl Copy for ContextEstimate
Source§impl Debug for ContextEstimate
impl Debug for ContextEstimate
Source§impl Default for ContextEstimate
impl Default for ContextEstimate
impl Eq for ContextEstimate
Source§impl PartialEq for ContextEstimate
impl PartialEq for ContextEstimate
impl StructuralPartialEq for ContextEstimate
Auto Trait Implementations§
impl Freeze for ContextEstimate
impl RefUnwindSafe for ContextEstimate
impl Send for ContextEstimate
impl Sync for ContextEstimate
impl Unpin for ContextEstimate
impl UnsafeUnpin for ContextEstimate
impl UnwindSafe for ContextEstimate
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.