pub struct Memory {Show 17 fields
pub id: Uuid,
pub memory_type: MemoryType,
pub content: String,
pub summary: Option<String>,
pub embedding: Option<Vec<f32>>,
pub importance: f32,
pub created_at: DateTime<Utc>,
pub last_accessed: DateTime<Utc>,
pub access_count: u32,
pub tags: Vec<String>,
pub metadata: HashMap<String, String>,
pub project_id: Option<Uuid>,
pub is_deleted: bool,
pub deleted_at: Option<DateTime<Utc>>,
pub chunk_group_id: Option<Uuid>,
pub chunk_index: Option<u32>,
pub chunk_total: Option<u32>,
}Fields§
§id: Uuid§memory_type: MemoryType§content: String§summary: Option<String>§embedding: Option<Vec<f32>>§importance: f32§created_at: DateTime<Utc>§last_accessed: DateTime<Utc>§access_count: u32§metadata: HashMap<String, String>§project_id: Option<Uuid>§is_deleted: bool§deleted_at: Option<DateTime<Utc>>§chunk_group_id: Option<Uuid>§chunk_index: Option<u32>§chunk_total: Option<u32>Implementations§
Source§impl Memory
impl Memory
pub fn new(content: String, memory_type: MemoryType) -> Self
pub fn with_project(self, project_id: Uuid) -> Self
pub fn with_chunk_info(self, group_id: Uuid, index: u32, total: u32) -> Self
pub fn access(&mut self)
pub fn is_chunked(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Memory
impl<'de> Deserialize<'de> for Memory
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 Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnsafeUnpin for Memory
impl UnwindSafe for Memory
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