pub struct OpenAiFormat;Expand description
OpenAI-compatible SSE format.
Formats Message and MessageDelta events as chat completion chunk
objects matching the OpenAI streaming API shape.
Trait Implementations§
Source§impl SseFormat for OpenAiFormat
impl SseFormat for OpenAiFormat
Source§fn format(&self, event: &EventEnvelope) -> Vec<SseFrame>
fn format(&self, event: &EventEnvelope) -> Vec<SseFrame>
Convert an event envelope into zero or more SSE frames. Read more
Source§fn done_frame(&self) -> Option<SseFrame>
fn done_frame(&self) -> Option<SseFrame>
An optional “done” frame to send when the stream terminates.
Auto Trait Implementations§
impl Freeze for OpenAiFormat
impl RefUnwindSafe for OpenAiFormat
impl Send for OpenAiFormat
impl Sync for OpenAiFormat
impl Unpin for OpenAiFormat
impl UnsafeUnpin for OpenAiFormat
impl UnwindSafe for OpenAiFormat
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