pub struct SearchIntentConfig {
pub enabled: bool,
pub use_llm: bool,
pub llm_timeout_ms: u64,
pub min_confidence: f32,
pub base_count: usize,
pub max_count: usize,
pub max_tokens: usize,
pub weights: NamespaceWeightsConfig,
}Expand description
Configuration for search intent detection.
Fields§
§enabled: boolWhether search intent detection is enabled.
use_llm: boolWhether to use LLM for intent classification.
llm_timeout_ms: u64Timeout for LLM classification in milliseconds.
min_confidence: f32Minimum confidence threshold for memory injection.
base_count: usizeBase memory count for adaptive injection.
max_count: usizeMaximum memory count for adaptive injection.
max_tokens: usizeMaximum tokens for injected memories.
weights: NamespaceWeightsConfigNamespace weights configuration.
Implementations§
Source§impl SearchIntentConfig
impl SearchIntentConfig
Sourcepub fn with_env_overrides(self) -> Self
pub fn with_env_overrides(self) -> Self
Applies environment overrides.
Sourcepub fn from_config_file(config: &ConfigFileSearchIntent) -> Self
pub fn from_config_file(config: &ConfigFileSearchIntent) -> Self
Builds configuration from config file settings.
Sourcepub const fn with_enabled(self, enabled: bool) -> Self
pub const fn with_enabled(self, enabled: bool) -> Self
Sets whether search intent detection is enabled.
Sourcepub const fn with_use_llm(self, use_llm: bool) -> Self
pub const fn with_use_llm(self, use_llm: bool) -> Self
Sets whether LLM is enabled.
Sourcepub const fn with_llm_timeout_ms(self, timeout_ms: u64) -> Self
pub const fn with_llm_timeout_ms(self, timeout_ms: u64) -> Self
Sets the LLM timeout in milliseconds.
Sourcepub const fn with_min_confidence(self, confidence: f32) -> Self
pub const fn with_min_confidence(self, confidence: f32) -> Self
Sets the minimum confidence threshold.
Value is clamped to the range [0.0, 1.0].
Sourcepub const fn with_base_count(self, count: usize) -> Self
pub const fn with_base_count(self, count: usize) -> Self
Sets the base memory count for adaptive injection.
Sourcepub const fn with_max_count(self, count: usize) -> Self
pub const fn with_max_count(self, count: usize) -> Self
Sets the maximum memory count for adaptive injection.
Sourcepub const fn with_max_tokens(self, tokens: usize) -> Self
pub const fn with_max_tokens(self, tokens: usize) -> Self
Sets the maximum tokens for injected memories.
Sourcepub fn with_weights(self, weights: NamespaceWeightsConfig) -> Self
pub fn with_weights(self, weights: NamespaceWeightsConfig) -> Self
Sets the namespace weights configuration.
Sourcepub fn build(self) -> Result<Self, ConfigValidationError>
pub fn build(self) -> Result<Self, ConfigValidationError>
Validates and builds the configuration.
§Errors
Returns an error if:
base_countis greater thanmax_countmax_tokensis zerollm_timeout_msis zero when LLM is enabled
Trait Implementations§
Source§impl Clone for SearchIntentConfig
impl Clone for SearchIntentConfig
Source§fn clone(&self) -> SearchIntentConfig
fn clone(&self) -> SearchIntentConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SearchIntentConfig
impl Debug for SearchIntentConfig
Auto Trait Implementations§
impl Freeze for SearchIntentConfig
impl RefUnwindSafe for SearchIntentConfig
impl Send for SearchIntentConfig
impl Sync for SearchIntentConfig
impl Unpin for SearchIntentConfig
impl UnwindSafe for SearchIntentConfig
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,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].