pub struct ContextUsage {
pub context_tokens: usize,
pub total_messages: usize,
pub context_messages: usize,
pub max_context_tokens: usize,
pub usage_percentage: f32,
}Expand description
Information about context usage
Fields§
§context_tokens: usizeEstimated token count for messages that will be sent
total_messages: usizeTotal messages in full history
context_messages: usizeMessages that will be sent to the model
max_context_tokens: usizeMaximum context tokens for the model
usage_percentage: f32Percentage of context used (0.0 - 1.0)
Trait Implementations§
Source§impl Clone for ContextUsage
impl Clone for ContextUsage
Source§fn clone(&self) -> ContextUsage
fn clone(&self) -> ContextUsage
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 moreAuto Trait Implementations§
impl Freeze for ContextUsage
impl RefUnwindSafe for ContextUsage
impl Send for ContextUsage
impl Sync for ContextUsage
impl Unpin for ContextUsage
impl UnwindSafe for ContextUsage
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