pub struct MemoryContext {
pub recent_episodes: Vec<AinlMemoryNode>,
pub relevant_semantic: Vec<AinlMemoryNode>,
pub active_patches: Vec<AinlMemoryNode>,
pub persona_snapshot: Option<PersonaSnapshot>,
pub compiled_at: DateTime<Utc>,
}Expand description
Compiled memory context for a turn (prompt-side assembly in the host).
The relevant_semantic slice is ranked by crate::AinlRuntime::compile_memory_context_for
from that method’s user_message only: None does not inherit the previous episode’s text
for topic ranking (use Some(user_message) when you want topic-aware order, or call
crate::AinlRuntime::run_turn, which always passes the current turn text).
Fields§
§recent_episodes: Vec<AinlMemoryNode>§relevant_semantic: Vec<AinlMemoryNode>§active_patches: Vec<AinlMemoryNode>§persona_snapshot: Option<PersonaSnapshot>§compiled_at: DateTime<Utc>Trait Implementations§
Source§impl Clone for MemoryContext
impl Clone for MemoryContext
Source§fn clone(&self) -> MemoryContext
fn clone(&self) -> MemoryContext
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 MemoryContext
impl Debug for MemoryContext
Auto Trait Implementations§
impl Freeze for MemoryContext
impl RefUnwindSafe for MemoryContext
impl Send for MemoryContext
impl Sync for MemoryContext
impl Unpin for MemoryContext
impl UnsafeUnpin for MemoryContext
impl UnwindSafe for MemoryContext
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