pub struct Query {
pub text: Option<String>,
pub embedding: Option<Vec<f32>>,
pub min_importance: Option<f64>,
pub limit: Option<usize>,
pub tiers: Option<Vec<MemoryTier>>,
pub metadata: Option<Value>,
}Expand description
Memory query structure
Fields§
§text: Option<String>Text-based search
embedding: Option<Vec<f32>>Vector embedding for similarity search
min_importance: Option<f64>Minimum importance threshold
limit: Option<usize>Maximum number of results
tiers: Option<Vec<MemoryTier>>Specific tiers to search (if None, searches all)
metadata: Option<Value>Metadata filters
Implementations§
Source§impl Query
impl Query
pub fn new() -> Self
pub fn with_text(self, text: impl Into<String>) -> Self
pub fn with_embedding(self, embedding: Vec<f32>) -> Self
pub fn with_min_importance(self, importance: f64) -> Self
pub fn with_limit(self, limit: usize) -> Self
pub fn with_tiers(self, tiers: Vec<MemoryTier>) -> Self
pub fn with_metadata(self, metadata: Value) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Query
impl<'de> Deserialize<'de> for Query
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnwindSafe for Query
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