pub struct ContextSelection {
pub messages: Vec<Message>,
pub before_tokens: usize,
pub after_tokens: usize,
pub removed_messages: usize,
}Expand description
The messages chosen for one model request, and what compaction cost.
Fields§
§messages: Vec<Message>§before_tokens: usizeEstimated tokens of the full request before compaction.
after_tokens: usizeEstimated tokens of the request as sent.
removed_messages: usizeHistory messages left out (replaced by a summary note).
Trait Implementations§
Source§impl Clone for ContextSelection
impl Clone for ContextSelection
Auto Trait Implementations§
impl Freeze for ContextSelection
impl RefUnwindSafe for ContextSelection
impl Send for ContextSelection
impl Sync for ContextSelection
impl Unpin for ContextSelection
impl UnsafeUnpin for ContextSelection
impl UnwindSafe for ContextSelection
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