pub struct ChatCompletionStreamDelta {
pub role: Option<MessageRole>,
pub content: Option<String>,
pub reasoning_content: Option<String>,
pub reasoning: Option<String>,
pub tool_calls: Option<Vec<ChatCompletionMessageToolCallChunk>>,
pub refusal: Option<String>,
}Expand description
Delta content for streaming responses
Fields§
§role: Option<MessageRole>Role of the message sender
content: Option<String>Content of the message delta
reasoning_content: Option<String>The reasoning content of the chunk message
reasoning: Option<String>The reasoning of the chunk message (same as reasoning_content)
tool_calls: Option<Vec<ChatCompletionMessageToolCallChunk>>Tool calls for this delta
refusal: Option<String>The refusal message generated by the model
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