pub struct ContextFragment {
pub id: String,
pub session: String,
pub key: Option<String>,
pub kind: FragmentKind,
pub content: String,
pub created_at: i64,
pub embedding: Option<Vec<f32>>,
}Expand description
A single unit of remembered context.
Fields§
§id: String§session: String§key: Option<String>Optional explicit key (used by Session::memorize/recall).
kind: FragmentKind§content: String§created_at: i64Unix epoch milliseconds.
embedding: Option<Vec<f32>>Optional dense vector for semantic (vector) recall. Populated by the
embed::LocalEmbedder when a fragment is memorized without one.
Implementations§
Trait Implementations§
Source§impl Clone for ContextFragment
impl Clone for ContextFragment
Source§fn clone(&self) -> ContextFragment
fn clone(&self) -> ContextFragment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContextFragment
impl Debug for ContextFragment
Source§impl<'de> Deserialize<'de> for ContextFragment
impl<'de> Deserialize<'de> for ContextFragment
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 ContextFragment
impl RefUnwindSafe for ContextFragment
impl Send for ContextFragment
impl Sync for ContextFragment
impl Unpin for ContextFragment
impl UnsafeUnpin for ContextFragment
impl UnwindSafe for ContextFragment
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