pub struct ResponsesHistoryCache(/* private fields */);Expand description
Connection-owned cache for store=false Responses continuation. Clone this
handle only within one client connection; dropping all handles loses its
cached content. No cache entries are written to StateStore for store=false.
Implementations§
Source§impl ResponsesHistoryCache
impl ResponsesHistoryCache
pub fn new(max_entries: usize, max_bytes: usize) -> Self
Sourcepub async fn expand<S: StateStore>(
&self,
request: &GenerateContentRequestBody,
state: &GenerationStateAccess<'_, S>,
limits: CodecLimits,
) -> Result<GenerateContentRequestBody, TransformError>
pub async fn expand<S: StateStore>( &self, request: &GenerateContentRequestBody, state: &GenerationStateAccess<'_, S>, limits: CodecLimits, ) -> Result<GenerateContentRequestBody, TransformError>
Expand a Responses request for a connection-owned orchestration layer. No generation is sent and previous instructions are not inherited.
Sourcepub async fn save_transcript<S: StateStore>(
&self,
response_id: &str,
input: Vec<InputItem>,
store: bool,
state: &GenerationStateAccess<'_, S>,
limits: CodecLimits,
) -> Result<(), TransformError>
pub async fn save_transcript<S: StateStore>( &self, response_id: &str, input: Vec<InputItem>, store: bool, state: &GenerationStateAccess<'_, S>, limits: CodecLimits, ) -> Result<(), TransformError>
Save the actual ordered transcript of a gateway response. This also supports warmup and interrupted responses without inventing a native generation or duplicating the output of earlier HTTP segments.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResponsesHistoryCache
impl RefUnwindSafe for ResponsesHistoryCache
impl Send for ResponsesHistoryCache
impl Sync for ResponsesHistoryCache
impl Unpin for ResponsesHistoryCache
impl UnsafeUnpin for ResponsesHistoryCache
impl UnwindSafe for ResponsesHistoryCache
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