pub struct BatchStoreMemoryItem {
pub content: String,
pub memory_type: MemoryType,
pub session_id: Option<String>,
pub importance: f32,
pub tags: Vec<String>,
pub metadata: Option<Value>,
pub ttl_seconds: Option<u64>,
pub expires_at: Option<u64>,
pub id: Option<String>,
}Expand description
A single memory entry within a BatchStoreMemoryRequest.
Mirrors StoreMemoryRequest but omits agent_id (supplied at batch level).
Fields§
§content: StringMemory content (required, max 100 000 chars).
memory_type: MemoryType§session_id: Option<String>§importance: f32§metadata: Option<Value>§ttl_seconds: Option<u64>§expires_at: Option<u64>§id: Option<String>Optional custom ID. Auto-generated if not provided.
Implementations§
Source§impl BatchStoreMemoryItem
impl BatchStoreMemoryItem
Sourcepub fn with_importance(self, importance: f32) -> Self
pub fn with_importance(self, importance: f32) -> Self
Set importance.
Set tags.
Sourcepub fn with_session(self, session_id: impl Into<String>) -> Self
pub fn with_session(self, session_id: impl Into<String>) -> Self
Set session.
Sourcepub fn with_metadata(self, metadata: Value) -> Self
pub fn with_metadata(self, metadata: Value) -> Self
Set metadata.
Trait Implementations§
Source§impl Clone for BatchStoreMemoryItem
impl Clone for BatchStoreMemoryItem
Source§fn clone(&self) -> BatchStoreMemoryItem
fn clone(&self) -> BatchStoreMemoryItem
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 BatchStoreMemoryItem
impl Debug for BatchStoreMemoryItem
Source§impl Default for BatchStoreMemoryItem
impl Default for BatchStoreMemoryItem
Source§fn default() -> BatchStoreMemoryItem
fn default() -> BatchStoreMemoryItem
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BatchStoreMemoryItem
impl<'de> Deserialize<'de> for BatchStoreMemoryItem
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 BatchStoreMemoryItem
impl RefUnwindSafe for BatchStoreMemoryItem
impl Send for BatchStoreMemoryItem
impl Sync for BatchStoreMemoryItem
impl Unpin for BatchStoreMemoryItem
impl UnsafeUnpin for BatchStoreMemoryItem
impl UnwindSafe for BatchStoreMemoryItem
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