pub struct TruncationResult {
pub rounds_removed: usize,
pub messages_removed: usize,
pub removed_messages: Vec<ChatCompletionRequestMessage>,
pub insert_position: usize,
pub needs_compression: bool,
}Expand description
Result of context truncation, used for async compression.
Fields§
§rounds_removed: usizeNumber of conversation rounds removed.
messages_removed: usizeNumber of individual messages removed.
removed_messages: Vec<ChatCompletionRequestMessage>The removed messages (for generating summary).
insert_position: usizePosition where summary should be inserted.
needs_compression: boolWhether compression is needed (token count exceeds threshold).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TruncationResult
impl RefUnwindSafe for TruncationResult
impl Send for TruncationResult
impl Sync for TruncationResult
impl Unpin for TruncationResult
impl UnsafeUnpin for TruncationResult
impl UnwindSafe for TruncationResult
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