pub struct KvCacheState { /* private fields */ }Expand description
Tracks the token sequence currently held in the KV cache.
By comparing a new prompt’s token sequence against the cached one, the agent loop can skip re-encoding the common prefix and only decode the delta. This is especially beneficial for multi-agent conversations where ~95% of the prompt is unchanged between turns.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KvCacheState
impl RefUnwindSafe for KvCacheState
impl Send for KvCacheState
impl Sync for KvCacheState
impl Unpin for KvCacheState
impl UnsafeUnpin for KvCacheState
impl UnwindSafe for KvCacheState
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