pub struct CompactionContext {
pub system_prompt: Option<String>,
pub model_client: Arc<dyn ModelClient>,
pub context_window_tokens: u64,
pub tools: Vec<ToolSpec>,
}Expand description
Context passed to CompactionStrategy::compact.
The policy receives the same system prompt, model client, resolved context
window, and tool specs that the agent loop would use for the next model
step. A strategy can use these inputs to run a summarization model call,
make a deterministic retention decision without a model, or decline to
change the history by returning the original messages.
Fields§
§system_prompt: Option<String>§model_client: Arc<dyn ModelClient>§context_window_tokens: u64§tools: Vec<ToolSpec>Auto Trait Implementations§
impl !RefUnwindSafe for CompactionContext
impl !UnwindSafe for CompactionContext
impl Freeze for CompactionContext
impl Send for CompactionContext
impl Sync for CompactionContext
impl Unpin for CompactionContext
impl UnsafeUnpin for CompactionContext
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