pub enum Delta {
Reasoning(String),
Content(String),
ToolCall {
name: String,
arguments: String,
},
Logprob(TokenLogprob),
}Expand description
A streamed piece of a response (re-exported from the single splitter in infr-chat).
A streamed piece of a response.
Variants§
Reasoning(String)
Content(String)
ToolCall
Logprob(TokenLogprob)
One sampled token’s log probability, emitted just before the Delta::Content that
carries its token’s text, so a streaming server can attach it to that chunk. Only answer
tokens get one: a token whose text is reasoning, a <think> marker or a parsed tool call
is not part of content, and its entry is dropped.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Delta
impl Freeze for Delta
impl Move for Delta
impl RefUnwindSafe for Delta
impl Send for Deltawhere
RawVecInner: Send,
impl Sync for Deltawhere
RawVecInner: Sync,
impl Unpin for Delta
impl UnsafeUnpin for Deltawhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<TokenLogprobAlt>: UnsafeUnpin,
impl UnwindSafe for Deltawhere
RawVecInner: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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