pub struct PromptCache { /* private fields */ }Expand description
Single-slot memo for the rendered system prompt, keyed by a hash of
the inputs. Most consecutive turns in a session pass identical
inputs (template, turn-driver-preamble-derived execution_prompt /
tool_names, plus context contributions), so a one-slot cache hits
repeatedly and avoids the section-by-section Vec<String>::join
work in PromptTemplate::render.
Implementations§
Trait Implementations§
Source§impl Debug for PromptCache
impl Debug for PromptCache
Source§impl Default for PromptCache
impl Default for PromptCache
Source§fn default() -> PromptCache
fn default() -> PromptCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for PromptCache
impl RefUnwindSafe for PromptCache
impl Send for PromptCache
impl Sync for PromptCache
impl Unpin for PromptCache
impl UnsafeUnpin for PromptCache
impl UnwindSafe for PromptCache
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