pub struct MemoryConfig {
pub capacity: usize,
pub persistence: bool,
pub decay_rate: f64,
pub importance_threshold: f64,
pub short_term_capacity: usize,
pub use_embeddings: bool,
pub embedding_model: EmbeddingModelType,
pub custom_model_path: Option<String>,
pub embedding_dimension: usize,
pub priority_categories: Vec<String>,
}Expand description
Configuration for the memory system
Fields§
§capacity: usizeMaximum number of memories to store
persistence: boolWhether to persist memories to disk
decay_rate: f64Time-based decay rate for memories (0.0 - 1.0)
importance_threshold: f64Importance threshold for retrieving memories
short_term_capacity: usizeNumber of memories to keep in short-term memory
use_embeddings: boolWhether to use vector embeddings for memory retrieval
embedding_model: EmbeddingModelTypeVector embedding model type
custom_model_path: Option<String>Path to custom embedding model (if using custom model)
embedding_dimension: usizeDimension of the embeddings
priority_categories: Vec<String>Memory categories to prioritize
Implementations§
Trait Implementations§
Source§impl Clone for MemoryConfig
impl Clone for MemoryConfig
Source§fn clone(&self) -> MemoryConfig
fn clone(&self) -> MemoryConfig
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 MemoryConfig
impl Debug for MemoryConfig
Source§impl Default for MemoryConfig
impl Default for MemoryConfig
Source§impl<'de> Deserialize<'de> for MemoryConfig
impl<'de> Deserialize<'de> for MemoryConfig
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 MemoryConfig
impl RefUnwindSafe for MemoryConfig
impl Send for MemoryConfig
impl Sync for MemoryConfig
impl Unpin for MemoryConfig
impl UnsafeUnpin for MemoryConfig
impl UnwindSafe for MemoryConfig
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