pub struct CompactionPreparation {
pub first_kept_entry_id: String,
pub messages_to_summarize: Vec<AgentMessage>,
pub turn_prefix_messages: Vec<AgentMessage>,
pub is_split_turn: bool,
pub tokens_before: u64,
pub previous_summary: Option<String>,
}Expand description
Result of prepare_compaction — what to summarise and what to keep.
Fields§
§first_kept_entry_id: StringID of the first entry to keep (everything before is summarised).
messages_to_summarize: Vec<AgentMessage>Messages to summarise (will be replaced by a compaction entry).
turn_prefix_messages: Vec<AgentMessage>Turn-prefix messages when splitting a single turn.
is_split_turn: boolWhether the cut point split a turn in half.
tokens_before: u64Estimated total tokens before compaction.
previous_summary: Option<String>Previous compaction summary (for incremental update).
Trait Implementations§
Source§impl Clone for CompactionPreparation
impl Clone for CompactionPreparation
Source§fn clone(&self) -> CompactionPreparation
fn clone(&self) -> CompactionPreparation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CompactionPreparation
impl RefUnwindSafe for CompactionPreparation
impl Send for CompactionPreparation
impl Sync for CompactionPreparation
impl Unpin for CompactionPreparation
impl UnsafeUnpin for CompactionPreparation
impl UnwindSafe for CompactionPreparation
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