pub struct StreamPrinter { /* private fields */ }Expand description
Handles streaming output with special rendering for think blocks, tool calls, function responses, and inline/file data.
Implementations§
Source§impl StreamPrinter
impl StreamPrinter
Sourcepub fn new(thinking_mode: ThinkingDisplayMode) -> Self
pub fn new(thinking_mode: ThinkingDisplayMode) -> Self
Create a printer with the selected thinking display mode.
Sourcepub fn handle_part(&mut self, part: &Part)
pub fn handle_part(&mut self, part: &Part)
Process a single response part, rendering it to stdout.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamPrinter
impl RefUnwindSafe for StreamPrinter
impl Send for StreamPrinter
impl Sync for StreamPrinter
impl Unpin for StreamPrinter
impl UnsafeUnpin for StreamPrinter
impl UnwindSafe for StreamPrinter
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request