pub struct OptimizedContext {
pub chunks: Vec<String>,
pub total_tokens: usize,
pub original_count: usize,
pub final_count: usize,
pub tokens_saved: usize,
pub compression_ratio: f32,
}Expand description
Result of context optimization.
Fields§
§chunks: Vec<String>The selected chunks in final order.
total_tokens: usizeTotal tokens used by selected chunks.
original_count: usizeNumber of chunks in the original input.
final_count: usizeNumber of chunks after optimization.
tokens_saved: usizeTokens saved compared to including all chunks.
compression_ratio: f32Compression ratio: final_tokens / original_tokens (lower = more compression).
Trait Implementations§
Source§impl Clone for OptimizedContext
impl Clone for OptimizedContext
Source§fn clone(&self) -> OptimizedContext
fn clone(&self) -> OptimizedContext
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 OptimizedContext
impl RefUnwindSafe for OptimizedContext
impl Send for OptimizedContext
impl Sync for OptimizedContext
impl Unpin for OptimizedContext
impl UnsafeUnpin for OptimizedContext
impl UnwindSafe for OptimizedContext
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