pub struct ReplayProvider { /* private fields */ }Expand description
LLMProvider that dequeues recorded assistant messages instead of calling an API.
Implementations§
Trait Implementations§
Source§impl LLMProvider for ReplayProvider
impl LLMProvider for ReplayProvider
Source§fn runtime_policy(&self) -> RuntimePolicy
fn runtime_policy(&self) -> RuntimePolicy
Per-model runtime policy. Overridden by RuntimeOptions fields when set.
fn peek_provider_replay( &self, _content: &str, _tool_calls: &[ToolCall], ) -> Option<ProviderReplay>
fn seed_provider_replay( &self, _content: &str, _tool_calls: &[ToolCall], _replay: &ProviderReplay, )
fn stream<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
context: &'life1 RenderedContext,
tools: &'life2 [ToolSchema],
_extensions: Option<&'life3 Value>,
_state: Option<&'life4 ProviderRunState>,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Stream<Item = Result<StreamEvent>> + Send + Unpin>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn create_run_state(&self) -> Option<ProviderRunState>
fn create_run_state(&self) -> Option<ProviderRunState>
Optional per-run state for protocol-native continuation (e.g. Responses API).
fn commit_stream_replay(&self, _content: &str, _tool_calls: &[ToolCall])
Source§fn complete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 RenderedContext,
tools: &'life2 [ToolSchema],
extensions: Option<&'life3 Value>,
) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn complete<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 RenderedContext,
tools: &'life2 [ToolSchema],
extensions: Option<&'life3 Value>,
) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Non-streaming completion — default collects from
stream.Auto Trait Implementations§
impl !Freeze for ReplayProvider
impl !RefUnwindSafe for ReplayProvider
impl !UnwindSafe for ReplayProvider
impl Send for ReplayProvider
impl Sync for ReplayProvider
impl Unpin for ReplayProvider
impl UnsafeUnpin for ReplayProvider
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