pub struct OpticalForgettingConfig {
pub enabled: bool,
pub compress_provider: ProviderName,
pub compress_after_turns: u32,
pub summarize_after_turns: u32,
pub sweep_interval_secs: u64,
pub sweep_batch_size: usize,
}Expand description
ScrapMem optical forgetting configuration.
Controls progressive content-fidelity decay: Full → Compressed → SummaryOnly.
The sweep is orthogonal to SleepGate (which decays importance scores); optical
forgetting compresses content in place based on age.
§Example (TOML)
[memory.optical_forgetting]
enabled = false
compress_provider = ""
compress_after_turns = 100
summarize_after_turns = 500
sweep_interval_secs = 3600
sweep_batch_size = 50Fields§
§enabled: boolEnable optical forgetting sweep. Default: false.
compress_provider: ProviderNameProvider name from [[llm.providers]] for LLM-based content compression.
Falls back to the primary provider when empty.
compress_after_turns: u32Number of conversation turns after which Full messages are compressed. Default: 100.
summarize_after_turns: u32Number of conversation turns after which Compressed messages become SummaryOnly. Default: 500.
sweep_interval_secs: u64How often the sweep runs, in seconds. Default: 3600.
sweep_batch_size: usizeMaximum messages to compress per sweep iteration. Default: 50.
Trait Implementations§
Source§impl Clone for OpticalForgettingConfig
impl Clone for OpticalForgettingConfig
Source§fn clone(&self) -> OpticalForgettingConfig
fn clone(&self) -> OpticalForgettingConfig
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 moreSource§impl Debug for OpticalForgettingConfig
impl Debug for OpticalForgettingConfig
Source§impl Default for OpticalForgettingConfig
impl Default for OpticalForgettingConfig
Source§impl<'de> Deserialize<'de> for OpticalForgettingConfigwhere
OpticalForgettingConfig: Default,
impl<'de> Deserialize<'de> for OpticalForgettingConfigwhere
OpticalForgettingConfig: Default,
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OpticalForgettingConfig
impl RefUnwindSafe for OpticalForgettingConfig
impl Send for OpticalForgettingConfig
impl Sync for OpticalForgettingConfig
impl Unpin for OpticalForgettingConfig
impl UnsafeUnpin for OpticalForgettingConfig
impl UnwindSafe for OpticalForgettingConfig
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