pub struct CompactionResult {
pub boundary_marker: Message,
pub summary_messages: Vec<Message>,
pub messages_to_keep: Option<Vec<Message>>,
pub attachments: Vec<Message>,
pub pre_compact_token_count: u32,
pub post_compact_token_count: u32,
pub true_post_compact_token_count: Option<u64>,
pub compaction_usage: Option<TokenUsage>,
}Expand description
Compact result containing the new messages after compaction
Fields§
§boundary_marker: MessageThe boundary marker message
summary_messages: Vec<Message>Summary messages to keep
messages_to_keep: Option<Vec<Message>>Messages that were kept (not summarized)
attachments: Vec<Message>Attachments to include
pre_compact_token_count: u32Pre-compaction token count
post_compact_token_count: u32Post-compaction token count
true_post_compact_token_count: Option<u64>True post-compact token count (estimated from final compacted messages)
compaction_usage: Option<TokenUsage>Token usage from the compaction API call itself
Trait Implementations§
Source§impl Clone for CompactionResult
impl Clone for CompactionResult
Source§fn clone(&self) -> CompactionResult
fn clone(&self) -> CompactionResult
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 CompactionResult
impl RefUnwindSafe for CompactionResult
impl Send for CompactionResult
impl Sync for CompactionResult
impl Unpin for CompactionResult
impl UnsafeUnpin for CompactionResult
impl UnwindSafe for CompactionResult
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