pub struct MemoryCompaction {
pub kind: Kind,
pub context_window: Option<i32>,
}Expand description
MemoryCompaction : Keeps the whole memory named by the run’s memory id (or the step’s memory_id), replacing its older part with a summary as the conversation approaches the model’s context window. Without a memory id the agent runs without memory, and compaction bounds the run’s own loop.
Fields§
§kind: Kind§context_window: Option<i32>Overrides the context window looked up from the model, in tokens. Only a model Windmill does not know needs one; those fall back to 128000.
Implementations§
Source§impl MemoryCompaction
impl MemoryCompaction
Sourcepub fn new(kind: Kind) -> MemoryCompaction
pub fn new(kind: Kind) -> MemoryCompaction
Keeps the whole memory named by the run’s memory id (or the step’s memory_id), replacing its older part with a summary as the conversation approaches the model’s context window. Without a memory id the agent runs without memory, and compaction bounds the run’s own loop.
Trait Implementations§
Source§impl Clone for MemoryCompaction
impl Clone for MemoryCompaction
Source§impl Debug for MemoryCompaction
impl Debug for MemoryCompaction
Source§impl Default for MemoryCompaction
impl Default for MemoryCompaction
Source§impl<'de> Deserialize<'de> for MemoryCompaction
impl<'de> Deserialize<'de> for MemoryCompaction
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
Source§impl PartialEq for MemoryCompaction
impl PartialEq for MemoryCompaction
Source§impl Serialize for MemoryCompaction
impl Serialize for MemoryCompaction
impl StructuralPartialEq for MemoryCompaction
Auto Trait Implementations§
impl Freeze for MemoryCompaction
impl RefUnwindSafe for MemoryCompaction
impl Send for MemoryCompaction
impl Sync for MemoryCompaction
impl Unpin for MemoryCompaction
impl UnsafeUnpin for MemoryCompaction
impl UnwindSafe for MemoryCompaction
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