pub struct AdaptiveContextConfig {
pub base_count: usize,
pub max_count: usize,
pub max_tokens: usize,
pub preview_length: usize,
pub min_confidence: f32,
}Expand description
Configuration for adaptive memory context injection.
Fields§
§base_count: usizeBase number of memories to retrieve.
max_count: usizeMaximum number of memories to retrieve (high confidence).
max_tokens: usizeMaximum tokens for injected memory content.
preview_length: usizeMaximum length for content preview.
min_confidence: f32Minimum confidence threshold for injection.
Implementations§
Source§impl AdaptiveContextConfig
impl AdaptiveContextConfig
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.
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.
Sourcepub const fn with_max_tokens(self, tokens: usize) -> Self
pub const fn with_max_tokens(self, tokens: usize) -> Self
Sets the maximum token budget.
Sourcepub const fn with_preview_length(self, length: usize) -> Self
pub const fn with_preview_length(self, length: usize) -> Self
Sets the preview length for memory content.
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.
Sourcepub const fn memories_for_confidence(&self, confidence: f32) -> usize
pub const fn memories_for_confidence(&self, confidence: f32) -> usize
Calculates the number of memories to retrieve based on confidence.
Trait Implementations§
Source§impl Clone for AdaptiveContextConfig
impl Clone for AdaptiveContextConfig
Source§fn clone(&self) -> AdaptiveContextConfig
fn clone(&self) -> AdaptiveContextConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 AdaptiveContextConfig
impl Debug for AdaptiveContextConfig
Auto Trait Implementations§
impl Freeze for AdaptiveContextConfig
impl RefUnwindSafe for AdaptiveContextConfig
impl Send for AdaptiveContextConfig
impl Sync for AdaptiveContextConfig
impl Unpin for AdaptiveContextConfig
impl UnwindSafe for AdaptiveContextConfig
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