pub struct ChatCompletionStreamDelta {
pub role: Option<String>,
pub content: Option<String>,
pub tool_calls: Option<Vec<ToolCall>>,
}Expand description
Represents the delta (change) in a streaming chat completion response.
Fields§
§role: Option<String>The role of the message (only present in the first chunk).
content: Option<String>The new content for this chunk.
tool_calls: Option<Vec<ToolCall>>Tool calls for this chunk (if any).
Trait Implementations§
Source§impl Clone for ChatCompletionStreamDelta
impl Clone for ChatCompletionStreamDelta
Source§fn clone(&self) -> ChatCompletionStreamDelta
fn clone(&self) -> ChatCompletionStreamDelta
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 ChatCompletionStreamDelta
impl Debug for ChatCompletionStreamDelta
Source§impl<'de> Deserialize<'de> for ChatCompletionStreamDelta
impl<'de> Deserialize<'de> for ChatCompletionStreamDelta
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 ChatCompletionStreamDelta
impl RefUnwindSafe for ChatCompletionStreamDelta
impl Send for ChatCompletionStreamDelta
impl Sync for ChatCompletionStreamDelta
impl Unpin for ChatCompletionStreamDelta
impl UnwindSafe for ChatCompletionStreamDelta
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