pub struct IndexedMemory {Show 15 fields
pub id: MemoryId,
pub kind: MemoryKind,
pub status: MemoryStatus,
pub predicate: CanonicalPredicate,
pub confidence: f32,
pub explicit: bool,
pub origin: MemoryOrigin,
pub temporal_scope: TemporalScope,
pub valid_from: DateTime<Utc>,
pub expires_at: Option<DateTime<Utc>>,
pub statement: String,
pub value: String,
pub subject_form: String,
pub entity_forms: Vec<String>,
pub fields: [Vec<String>; 7],
}Expand description
A memory reduced to what the index needs.
Fields§
§id: MemoryIdRecord identity.
kind: MemoryKindMemory kind, for scope filtering.
status: MemoryStatusLifecycle state.
predicate: CanonicalPredicateCanonical predicate, for per-predicate diversity limits.
confidence: f32Aggregated confidence.
explicit: boolWhether the record rests on something the user said outright.
origin: MemoryOriginWhere the record came from.
temporal_scope: TemporalScopeExpected persistence.
valid_from: DateTime<Utc>When the fact started holding.
expires_at: Option<DateTime<Utc>>When it stops being retrievable, if ever.
statement: StringThe sentence handed to the model.
value: StringThe value side of the fact, for filling governed state slots.
A slot wants “pescatarian”, not “The user is pescatarian.” — the statement is for the model, the value is for the application.
subject_form: StringNormalized subject surface form, for exact-entity boosting.
entity_forms: Vec<String>Normalized entity surface forms, for exact-entity boosting.
fields: [Vec<String>; 7]Tokenized field contents.
Implementations§
Source§impl IndexedMemory
impl IndexedMemory
Sourcepub fn from_canonical(memory: &CanonicalMemory) -> Self
pub fn from_canonical(memory: &CanonicalMemory) -> Self
Project a canonical record into the index.
Sourcepub fn as_session_overlay(self) -> Self
pub fn as_session_overlay(self) -> Self
Mark this document as an uncommitted session fact.
Sourcepub fn is_retrievable(&self, now: DateTime<Utc>) -> bool
pub fn is_retrievable(&self, now: DateTime<Utc>) -> bool
Whether the document may be returned at now.
Trait Implementations§
Source§impl Clone for IndexedMemory
impl Clone for IndexedMemory
Source§fn clone(&self) -> IndexedMemory
fn clone(&self) -> IndexedMemory
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for IndexedMemory
impl RefUnwindSafe for IndexedMemory
impl Send for IndexedMemory
impl Sync for IndexedMemory
impl Unpin for IndexedMemory
impl UnwindSafe for IndexedMemory
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].