pub struct SemanticConfig {
pub enabled: bool,
pub recall_limit: usize,
pub vector_weight: f64,
pub keyword_weight: f64,
pub temporal_decay_enabled: bool,
pub temporal_decay_half_life_days: u32,
pub mmr_enabled: bool,
pub mmr_lambda: f32,
pub importance_enabled: bool,
pub importance_weight: f64,
pub embed_provider: Option<String>,
}Expand description
Semantic (vector) memory retrieval configuration, nested under [memory.semantic] in TOML.
Controls how memories are searched and ranked, including temporal decay, MMR diversity re-ranking, and hybrid BM25+vector weighting.
§Example (TOML)
[memory.semantic]
enabled = true
recall_limit = 5
vector_weight = 0.7
keyword_weight = 0.3
mmr_lambda = 0.7Fields§
§enabled: boolEnable vector-based semantic recall. Default: true.
recall_limit: usize§vector_weight: f64§keyword_weight: f64§temporal_decay_enabled: bool§temporal_decay_half_life_days: u32§mmr_enabled: bool§mmr_lambda: f32§importance_enabled: bool§importance_weight: f64§embed_provider: Option<String>Name of a [[llm.providers]] entry to use exclusively for embedding calls during
memory write and backfill operations. A dedicated provider prevents embed_backfill
from contending with the guardrail at the API server level (rate limits, Ollama
single-model lock). When unset or empty, falls back to the main agent provider.
Trait Implementations§
Source§impl Debug for SemanticConfig
impl Debug for SemanticConfig
Source§impl Default for SemanticConfig
impl Default for SemanticConfig
Source§fn default() -> SemanticConfig
fn default() -> SemanticConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SemanticConfig
impl<'de> Deserialize<'de> for SemanticConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SemanticConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SemanticConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SemanticConfig
impl Serialize for SemanticConfig
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 SemanticConfig
impl RefUnwindSafe for SemanticConfig
impl Send for SemanticConfig
impl Sync for SemanticConfig
impl Unpin for SemanticConfig
impl UnsafeUnpin for SemanticConfig
impl UnwindSafe for SemanticConfig
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> 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