pub struct AgentStreamCall<O> {
pub call: AgentCall<O>,
/* private fields */
}Expand description
Parameters of one streaming agent call.
Fields§
§call: AgentCall<O>The shared call parameters.
Implementations§
Source§impl<O> AgentStreamCall<O>
impl<O> AgentStreamCall<O>
Sourcepub fn transform(self, transform: impl StreamTransform + 'static) -> Self
pub fn transform(self, transform: impl StreamTransform + 'static) -> Self
Adds a stream transform (applied in order).
Sourcepub fn include_raw_chunks(self) -> Self
pub fn include_raw_chunks(self) -> Self
Forwards raw provider chunks.
Sourcepub fn stream_retries(self, retries: u32) -> Self
pub fn stream_retries(self, retries: u32) -> Self
Enables automatic retries of failed model streams.
Sourcepub fn on_chunk(self, f: impl HookFn<StreamEvent>) -> Self
pub fn on_chunk(self, f: impl HookFn<StreamEvent>) -> Self
Adds a chunk hook.
Sourcepub fn on_abort(self, f: impl HookFn<AbortEvent>) -> Self
pub fn on_abort(self, f: impl HookFn<AbortEvent>) -> Self
Adds an abort hook.
Trait Implementations§
Source§impl<O: Debug> Debug for AgentStreamCall<O>
impl<O: Debug> Debug for AgentStreamCall<O>
Auto Trait Implementations§
impl<O> !Freeze for AgentStreamCall<O>
impl<O> !RefUnwindSafe for AgentStreamCall<O>
impl<O> !UnwindSafe for AgentStreamCall<O>
impl<O> Send for AgentStreamCall<O>
impl<O> Sync for AgentStreamCall<O>
impl<O> Unpin for AgentStreamCall<O>
impl<O> UnsafeUnpin for AgentStreamCall<O>where
AgentCall<O>: UnsafeUnpin,
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