pub struct ContextBudget {
pub compact_threshold: usize,
pub compact_keep_recent: usize,
pub hard_cap: Option<usize>,
}Expand description
How large a single request’s context may get.
Fields§
§compact_threshold: usizeCompact once the context passes this. 0 disables compaction.
compact_keep_recent: usizeRounds compaction keeps.
hard_cap: Option<usize>A ceiling compaction is not allowed to leave the context above. None
is what the engine has always done — the threshold said when to start
compacting and nothing said when to stop trying.
Trait Implementations§
Source§impl Clone for ContextBudget
impl Clone for ContextBudget
impl Copy for ContextBudget
Source§impl Debug for ContextBudget
impl Debug for ContextBudget
impl Eq for ContextBudget
Source§impl PartialEq for ContextBudget
impl PartialEq for ContextBudget
impl StructuralPartialEq for ContextBudget
Auto Trait Implementations§
impl Forget for ContextBudget
impl Freeze for ContextBudget
impl Move for ContextBudget
impl RefUnwindSafe for ContextBudget
impl Send for ContextBudget
impl Sync for ContextBudget
impl Unpin for ContextBudget
impl UnsafeUnpin for ContextBudget
impl UnwindSafe for ContextBudget
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