pub struct RecallRequest {
pub agent_id: String,
pub query: String,
pub top_k: usize,
pub memory_type: Option<MemoryType>,
pub min_importance: f32,
pub session_id: Option<String>,
pub tags: Vec<String>,
}Expand description
Recall memories request
Fields§
§agent_id: String§query: String§top_k: usize§memory_type: Option<MemoryType>§min_importance: f32§session_id: Option<String>Implementations§
Source§impl RecallRequest
impl RecallRequest
Sourcepub fn new(agent_id: impl Into<String>, query: impl Into<String>) -> Self
pub fn new(agent_id: impl Into<String>, query: impl Into<String>) -> Self
Create a new recall request
Sourcepub fn with_top_k(self, top_k: usize) -> Self
pub fn with_top_k(self, top_k: usize) -> Self
Set number of results
Sourcepub fn with_type(self, memory_type: MemoryType) -> Self
pub fn with_type(self, memory_type: MemoryType) -> Self
Filter by memory type
Sourcepub fn with_min_importance(self, min: f32) -> Self
pub fn with_min_importance(self, min: f32) -> Self
Set minimum importance threshold
Sourcepub fn with_session(self, session_id: impl Into<String>) -> Self
pub fn with_session(self, session_id: impl Into<String>) -> Self
Filter by session
Filter by tags
Trait Implementations§
Source§impl Clone for RecallRequest
impl Clone for RecallRequest
Source§fn clone(&self) -> RecallRequest
fn clone(&self) -> RecallRequest
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 RecallRequest
impl Debug for RecallRequest
Source§impl<'de> Deserialize<'de> for RecallRequest
impl<'de> Deserialize<'de> for RecallRequest
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 RecallRequest
impl RefUnwindSafe for RecallRequest
impl Send for RecallRequest
impl Sync for RecallRequest
impl Unpin for RecallRequest
impl UnsafeUnpin for RecallRequest
impl UnwindSafe for RecallRequest
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