pub enum PromptCacheBreakpoint {
ToolsEnd,
TranscriptItemEnd {
index: usize,
},
TranscriptPartEnd {
item_index: usize,
part_index: usize,
},
}Expand description
Prefix boundary that a provider should cache when using explicit caching.
Variants§
ToolsEnd
Cache the tool schema prefix through the last available tool.
TranscriptItemEnd
Cache through the end of the transcript item at index.
TranscriptPartEnd
Cache through the specific transcript part.
Not every adapter can target every part precisely; unsupported
fine-grained breakpoints become best-effort no-ops unless the request is
marked PromptCacheMode::Required.
Implementations§
Source§impl PromptCacheBreakpoint
impl PromptCacheBreakpoint
Sourcepub fn transcript_item_end(index: usize) -> Self
pub fn transcript_item_end(index: usize) -> Self
Cache through the end of a transcript item.
Sourcepub fn transcript_part_end(item_index: usize, part_index: usize) -> Self
pub fn transcript_part_end(item_index: usize, part_index: usize) -> Self
Cache through a specific part within a transcript item.
Trait Implementations§
Source§impl Clone for PromptCacheBreakpoint
impl Clone for PromptCacheBreakpoint
Source§fn clone(&self) -> PromptCacheBreakpoint
fn clone(&self) -> PromptCacheBreakpoint
Returns a duplicate of the value. Read more
1.0.0 · 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 PromptCacheBreakpoint
impl Debug for PromptCacheBreakpoint
Source§impl<'de> Deserialize<'de> for PromptCacheBreakpoint
impl<'de> Deserialize<'de> for PromptCacheBreakpoint
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 PromptCacheBreakpoint
impl PartialEq for PromptCacheBreakpoint
Source§impl Serialize for PromptCacheBreakpoint
impl Serialize for PromptCacheBreakpoint
impl Eq for PromptCacheBreakpoint
impl StructuralPartialEq for PromptCacheBreakpoint
Auto Trait Implementations§
impl Freeze for PromptCacheBreakpoint
impl RefUnwindSafe for PromptCacheBreakpoint
impl Send for PromptCacheBreakpoint
impl Sync for PromptCacheBreakpoint
impl Unpin for PromptCacheBreakpoint
impl UnsafeUnpin for PromptCacheBreakpoint
impl UnwindSafe for PromptCacheBreakpoint
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