pub enum ResponseDelta {
Text {
index: usize,
content: String,
},
ToolCall {
index: usize,
name: Option<String>,
args: Option<String>,
id: Option<String>,
},
Thinking {
index: usize,
content: String,
signature: Option<String>,
},
Finish {
reason: FinishReason,
},
Usage {
usage: RequestUsage,
},
}Expand description
Delta types for applying to partial response.
Variants§
Text
Text content delta.
ToolCall
Tool call delta.
Fields
Thinking
Thinking delta.
Fields
Finish
Finish signal.
Fields
§
reason: FinishReasonFinish reason.
Usage
Usage update.
Fields
§
usage: RequestUsageCurrent usage.
Trait Implementations§
Source§impl Clone for ResponseDelta
impl Clone for ResponseDelta
Source§fn clone(&self) -> ResponseDelta
fn clone(&self) -> ResponseDelta
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseDelta
impl Debug for ResponseDelta
Source§impl<'de> Deserialize<'de> for ResponseDelta
impl<'de> Deserialize<'de> for ResponseDelta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ResponseDelta
impl RefUnwindSafe for ResponseDelta
impl Send for ResponseDelta
impl Sync for ResponseDelta
impl Unpin for ResponseDelta
impl UnwindSafe for ResponseDelta
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