pub struct RecallRequest {Show 14 fields
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>,
pub include_associated: bool,
pub associated_memories_cap: Option<u32>,
pub associated_memories_depth: Option<u8>,
pub associated_memories_min_weight: Option<f32>,
pub since: Option<String>,
pub until: Option<String>,
pub routing: Option<RoutingMode>,
}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>§include_associated: boolCOG-2: traverse KG depth-1 from recalled memories and include associatively linked memories in the response (default: false)
associated_memories_cap: Option<u32>COG-2: max associated memories to return (default: 10, max: 10)
associated_memories_depth: Option<u8>KG-3: KG traversal depth 1–3 (default: 1); requires include_associated
associated_memories_min_weight: Option<f32>KG-3: minimum edge weight for KG traversal (default: 0.0)
since: Option<String>CE-7: only recall memories created at or after this ISO-8601 timestamp
until: Option<String>CE-7: only recall memories created at or before this ISO-8601 timestamp
routing: Option<RoutingMode>CE-10: retrieval routing mode. None uses the server default (auto).
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
Sourcepub fn with_associated(self) -> Self
pub fn with_associated(self) -> Self
COG-2: include KG depth-1 associated memories in the response
Sourcepub fn with_associated_cap(self, cap: u32) -> Self
pub fn with_associated_cap(self, cap: u32) -> Self
COG-2: set max associated memories cap (default: 10, max: 10)
Sourcepub fn with_since(self, since: impl Into<String>) -> Self
pub fn with_since(self, since: impl Into<String>) -> Self
CE-7: only recall memories created at or after this ISO-8601 timestamp
Sourcepub fn with_until(self, until: impl Into<String>) -> Self
pub fn with_until(self, until: impl Into<String>) -> Self
CE-7: only recall memories created at or before this ISO-8601 timestamp
Sourcepub fn with_routing(self, routing: RoutingMode) -> Self
pub fn with_routing(self, routing: RoutingMode) -> Self
CE-10: set retrieval routing mode
Sourcepub fn with_associated_depth(self, depth: u8) -> Self
pub fn with_associated_depth(self, depth: u8) -> Self
KG-3: set KG traversal depth (1–3, default: 1); implies include_associated
Sourcepub fn with_associated_min_weight(self, weight: f32) -> Self
pub fn with_associated_min_weight(self, weight: f32) -> Self
KG-3: set minimum edge weight for KG traversal (default: 0.0)
Trait Implementations§
Source§impl Clone for RecallRequest
impl Clone for RecallRequest
Source§fn clone(&self) -> RecallRequest
fn clone(&self) -> RecallRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more