pub struct MemzConfig {
pub db_path: String,
pub session_id: String,
pub vector_type: Option<VectorType>,
pub dimensions: Option<u32>,
pub top_k: Option<u32>,
pub learning_rate: Option<f64>,
pub decay_rate: Option<f64>,
pub apply_migrations: Option<bool>,
}Fields§
§db_path: StringPath to the Turso database file
session_id: StringSession identifier — each agent session gets its own ID
vector_type: Option<VectorType>Vector type for distance calculations (default: Vector32)
dimensions: Option<u32>Embedding dimensions (default: 384)
top_k: Option<u32>Number of memories to retrieve per task (default: 5)
learning_rate: Option<f64>EMA learning rate for weight updates (default: 0.1)
decay_rate: Option<f64>Daily decay rate for unused memories (default: 0.995)
apply_migrations: Option<bool>Run memz migrations in [MemoryStore::init] (default: true). Set false when the host
already applied crate::memz::migrations::MIGRATIONS.
Implementations§
Source§impl MemzConfig
impl MemzConfig
pub fn new(db_path: impl Into<String>, session_id: impl Into<String>) -> Self
pub fn vector_type(self, vector_type: VectorType) -> Self
pub fn dimensions(self, dimensions: u32) -> Self
pub fn top_k(self, top_k: u32) -> Self
pub fn learning_rate(self, learning_rate: f64) -> Self
pub fn decay_rate(self, decay_rate: f64) -> Self
pub fn apply_migrations(self, apply: bool) -> Self
Trait Implementations§
Source§impl Clone for MemzConfig
impl Clone for MemzConfig
Source§fn clone(&self) -> MemzConfig
fn clone(&self) -> MemzConfig
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 moreAuto Trait Implementations§
impl Freeze for MemzConfig
impl RefUnwindSafe for MemzConfig
impl Send for MemzConfig
impl Sync for MemzConfig
impl Unpin for MemzConfig
impl UnsafeUnpin for MemzConfig
impl UnwindSafe for MemzConfig
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
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,
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 more