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§fn default() -> OpticalForgettingConfig
fn default() -> OpticalForgettingConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OpticalForgettingConfigwhere
OpticalForgettingConfig: Default,
impl<'de> Deserialize<'de> for OpticalForgettingConfigwhere
OpticalForgettingConfig: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OpticalForgettingConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OpticalForgettingConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for OpticalForgettingConfig
impl Serialize for OpticalForgettingConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request