pub struct CompactionSettings {
pub summary_instructions: Option<String>,
pub retained_user_message_tokens: Option<usize>,
}Expand description
Compaction summarizer tuning ([compaction], #5956).
auto_compact / auto_compact_threshold_percent (settings.toml) decide
when compaction runs; these two keys decide how the pass behaves. Both
are absent by default and absent means today’s built-in behavior, byte for
byte.
Fields§
§summary_instructions: Option<String>Standing operator instructions appended to the built-in summarizer
prompt on every pass, manual and automatic — the effort-free
counterpart to a one-off /compact <focus>, which still composes
after this text. Empty or whitespace-only is treated as unset;
longer than COMPACTION_SUMMARY_INSTRUCTIONS_MAX_CHARS is
truncated where it is applied.
retained_user_message_tokens: Option<usize>Token budget for the recent plain user messages kept verbatim in the
replacement history. Clamped to
MIN_COMPACTION_RETAINED_USER_MESSAGE_TOKENS..=
MAX_COMPACTION_RETAINED_USER_MESSAGE_TOKENS; unset keeps
DEFAULT_COMPACTION_RETAINED_USER_MESSAGE_TOKENS.
Trait Implementations§
Source§impl Clone for CompactionSettings
impl Clone for CompactionSettings
Source§impl Debug for CompactionSettings
impl Debug for CompactionSettings
Source§impl Default for CompactionSettings
impl Default for CompactionSettings
Source§impl<'de> Deserialize<'de> for CompactionSettings
impl<'de> Deserialize<'de> for CompactionSettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Forget for CompactionSettings
impl Freeze for CompactionSettings
impl Move for CompactionSettings
impl RefUnwindSafe for CompactionSettings
impl Send for CompactionSettings
impl Sync for CompactionSettings
impl Unpin for CompactionSettings
impl UnsafeUnpin for CompactionSettings
impl UnwindSafe for CompactionSettings
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.