pub struct ExtractionConfig {Show 13 fields
pub min_importance: f32,
pub auto_dedupe: bool,
pub dedupe_threshold: f32,
pub checkpoint_interval_ms: u64,
pub max_buffer_size: usize,
pub extract_entities: bool,
pub create_relationships: bool,
pub merge_consecutive: bool,
pub trigger_events: Vec<String>,
pub enable_context_injection: bool,
pub injection_min_relevance: f32,
pub injection_max_memories: usize,
pub injection_cooldown_secs: u64,
}Expand description
Configuration for automatic memory extraction from streams
Fields§
§min_importance: f32Minimum importance threshold for memory creation (0.0 - 1.0) Lower values = more memories created, higher = only important content
auto_dedupe: boolAutomatically deduplicate similar memories
dedupe_threshold: f32Similarity threshold for deduplication (0.0 - 1.0) Higher = stricter dedup, lower = more aggressive dedup
checkpoint_interval_ms: u64Checkpoint interval in milliseconds (time-based trigger) Set to 0 to disable time-based extraction
max_buffer_size: usizeMaximum messages to buffer before forced flush
extract_entities: boolExtract entities using NER
create_relationships: boolCreate graph relationships between extracted entities
merge_consecutive: boolMerge consecutive messages from same source
trigger_events: Vec<String>Event types that trigger immediate extraction
enable_context_injection: boolEnable proactive context injection (surface relevant memories on each message)
injection_min_relevance: f32Minimum relevance score for context injection (0.0 - 1.0) Higher = stricter, surfaces only highly relevant memories
injection_max_memories: usizeMaximum memories to inject per message
injection_cooldown_secs: u64Cooldown in seconds before re-injecting same memory
Implementations§
Source§impl ExtractionConfig
impl ExtractionConfig
Sourcepub fn validate_and_clamp(&mut self)
pub fn validate_and_clamp(&mut self)
Validate and clamp config values to sane ranges This prevents DoS attacks via malformed configurations
Trait Implementations§
Source§impl Clone for ExtractionConfig
impl Clone for ExtractionConfig
Source§fn clone(&self) -> ExtractionConfig
fn clone(&self) -> ExtractionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExtractionConfig
impl Debug for ExtractionConfig
Source§impl Default for ExtractionConfig
impl Default for ExtractionConfig
Source§impl<'de> Deserialize<'de> for ExtractionConfig
impl<'de> Deserialize<'de> for ExtractionConfig
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 Freeze for ExtractionConfig
impl RefUnwindSafe for ExtractionConfig
impl Send for ExtractionConfig
impl Sync for ExtractionConfig
impl Unpin for ExtractionConfig
impl UnsafeUnpin for ExtractionConfig
impl UnwindSafe for ExtractionConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>, which can then be
downcast into Box<dyn 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>, which 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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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 more