pub struct MemoryQuery {
pub filters: HashMap<String, Value>,
pub limit: Option<usize>,
pub semantic_query: Option<String>,
pub similarity_threshold: Option<f32>,
}Expand description
Query filter for memory retrieval
Fields§
§filters: HashMap<String, Value>Metadata filters (exact match)
limit: Option<usize>Limit number of results
semantic_query: Option<String>Semantic search query (if vector backend)
similarity_threshold: Option<f32>Similarity threshold for vector search (0.0 to 1.0)
Implementations§
Source§impl MemoryQuery
impl MemoryQuery
Sourcepub fn with_filter(self, key: impl Into<String>, value: Value) -> Self
pub fn with_filter(self, key: impl Into<String>, value: Value) -> Self
Add a metadata filter
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Set result limit
Sourcepub fn with_semantic_query(self, query: impl Into<String>) -> Self
pub fn with_semantic_query(self, query: impl Into<String>) -> Self
Set semantic search query
Sourcepub fn with_threshold(self, threshold: f32) -> Self
pub fn with_threshold(self, threshold: f32) -> Self
Set similarity threshold
Trait Implementations§
Source§impl Clone for MemoryQuery
impl Clone for MemoryQuery
Source§fn clone(&self) -> MemoryQuery
fn clone(&self) -> MemoryQuery
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 MemoryQuery
impl Debug for MemoryQuery
Source§impl Default for MemoryQuery
impl Default for MemoryQuery
Source§fn default() -> MemoryQuery
fn default() -> MemoryQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryQuery
impl RefUnwindSafe for MemoryQuery
impl Send for MemoryQuery
impl Sync for MemoryQuery
impl Unpin for MemoryQuery
impl UnwindSafe for MemoryQuery
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