pub struct MemoryEntry {
pub content: String,
pub score: f64,
pub timestamp: usize,
}Expand description
A single entry in either tier of agent memory.
§Examples
use lmm_agent::cognition::memory::MemoryEntry;
let entry = MemoryEntry::new("Rust owns memory safely.".into(), 0.92, 3);
assert_eq!(entry.content, "Rust owns memory safely.");
assert_eq!(entry.score, 0.92);
assert_eq!(entry.timestamp, 3);Fields§
§content: StringThe raw text content of this memory (DDG observation, generated text, etc.).
score: f64Relevance / reward score assigned when this entry was created, ∈ [0, ∞).
timestamp: usizeThe loop step at which this entry was recorded.
Implementations§
Source§impl MemoryEntry
impl MemoryEntry
Trait Implementations§
Source§impl Clone for MemoryEntry
impl Clone for MemoryEntry
Source§fn clone(&self) -> MemoryEntry
fn clone(&self) -> MemoryEntry
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 MemoryEntry
impl Debug for MemoryEntry
Source§impl PartialEq for MemoryEntry
impl PartialEq for MemoryEntry
impl StructuralPartialEq for MemoryEntry
Auto Trait Implementations§
impl Freeze for MemoryEntry
impl RefUnwindSafe for MemoryEntry
impl Send for MemoryEntry
impl Sync for MemoryEntry
impl Unpin for MemoryEntry
impl UnsafeUnpin for MemoryEntry
impl UnwindSafe for MemoryEntry
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