pub struct MemoryWindow {
pub kind: Kind,
pub context_length: i32,
}Expand description
MemoryWindow : Keeps the most recent messages of the memory named by the run’s memory id (or the step’s memory_id). Without a memory id the agent runs without memory.
Fields§
§kind: Kind§context_length: i32Number of most recent messages to load and store. 0 turns memory off.
Implementations§
Source§impl MemoryWindow
impl MemoryWindow
Sourcepub fn new(kind: Kind, context_length: i32) -> MemoryWindow
pub fn new(kind: Kind, context_length: i32) -> MemoryWindow
Keeps the most recent messages of the memory named by the run’s memory id (or the step’s memory_id). Without a memory id the agent runs without memory.
Trait Implementations§
Source§impl Clone for MemoryWindow
impl Clone for MemoryWindow
Source§fn clone(&self) -> MemoryWindow
fn clone(&self) -> MemoryWindow
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 MemoryWindow
impl Debug for MemoryWindow
Source§impl Default for MemoryWindow
impl Default for MemoryWindow
Source§fn default() -> MemoryWindow
fn default() -> MemoryWindow
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MemoryWindow
impl<'de> Deserialize<'de> for MemoryWindow
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 MemoryWindow
impl PartialEq for MemoryWindow
Source§impl Serialize for MemoryWindow
impl Serialize for MemoryWindow
impl StructuralPartialEq for MemoryWindow
Auto Trait Implementations§
impl Freeze for MemoryWindow
impl RefUnwindSafe for MemoryWindow
impl Send for MemoryWindow
impl Sync for MemoryWindow
impl Unpin for MemoryWindow
impl UnsafeUnpin for MemoryWindow
impl UnwindSafe for MemoryWindow
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