pub struct MemoryChunk {
pub source_id: String,
pub text: String,
pub score: f32,
pub estimated_tokens: u32,
}Expand description
Retrieval unit. Memory strategies emit chunks; the assembler packs them into the prompt under the shared budget.
Fields§
§source_id: String§text: String§score: f32§estimated_tokens: u32Trait Implementations§
Source§impl Clone for MemoryChunk
impl Clone for MemoryChunk
Source§fn clone(&self) -> MemoryChunk
fn clone(&self) -> MemoryChunk
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 MemoryChunk
impl Debug for MemoryChunk
Source§impl<'de> Deserialize<'de> for MemoryChunk
impl<'de> Deserialize<'de> for MemoryChunk
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 MemoryChunk
impl RefUnwindSafe for MemoryChunk
impl Send for MemoryChunk
impl Sync for MemoryChunk
impl Unpin for MemoryChunk
impl UnsafeUnpin for MemoryChunk
impl UnwindSafe for MemoryChunk
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