pub enum ChatEvent {
Chunk(ChatFrame),
Whole(ChatFrame),
Done,
Failure(ProviderError),
BareText(String),
}Expand description
Classified Chat Completions frame, including whole replies and terminal signals.
Variants§
Chunk(ChatFrame)
A chat.completion.chunk: one step of a streamed turn.
Whole(ChatFrame)
A chat.completion: the whole turn in one frame.
Done
The [DONE] sentinel: the provider ended the stream.
Failure(ProviderError)
The wire’s in-band error envelope, delivered with a 200 status.
BareText(String)
A bare JSON string where an envelope belongs: the whole answer, with no metadata and no terminal reason. Mira’s gateway sends this.
Auto Trait Implementations§
impl !RefUnwindSafe for ChatEvent
impl !UnwindSafe for ChatEvent
impl Freeze for ChatEvent
impl Send for ChatEvent
impl Sync for ChatEvent
impl Unpin for ChatEvent
impl UnsafeUnpin for ChatEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more