pub struct ChatCompletionStreamResponseDelta {
pub content: Option<String>,
pub reasoning: Option<String>,
pub reasoning_content: Option<String>,
pub refusal: Option<String>,
pub role: Option<MessageRole>,
pub tool_calls: Vec<ChatCompletionMessageToolCallChunk>,
}Expand description
A chat completion delta generated by streamed model responses.
JSON schema
{
"description": "A chat completion delta generated by streamed model responses.",
"type": "object",
"properties": {
"content": {
"description": "The contents of the chunk message.",
"type": "string"
},
"reasoning": {
"description": "The reasoning of the chunk message. Same as reasoning_content.",
"type": "string"
},
"reasoning_content": {
"description": "The reasoning content of the chunk message.",
"type": "string"
},
"refusal": {
"description": "The refusal message generated by the model.",
"type": "string"
},
"role": {
"$ref": "#/definitions/MessageRole"
},
"tool_calls": {
"type": "array",
"items": {
"$ref": "#/definitions/ChatCompletionMessageToolCallChunk"
}
}
}
}Fields§
§content: Option<String>The contents of the chunk message.
reasoning: Option<String>The reasoning of the chunk message. Same as reasoning_content.
reasoning_content: Option<String>The reasoning content of the chunk message.
refusal: Option<String>The refusal message generated by the model.
role: Option<MessageRole>§tool_calls: Vec<ChatCompletionMessageToolCallChunk>Trait Implementations§
Source§impl Clone for ChatCompletionStreamResponseDelta
impl Clone for ChatCompletionStreamResponseDelta
Source§fn clone(&self) -> ChatCompletionStreamResponseDelta
fn clone(&self) -> ChatCompletionStreamResponseDelta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for ChatCompletionStreamResponseDelta
impl<'de> Deserialize<'de> for ChatCompletionStreamResponseDelta
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 ChatCompletionStreamResponseDelta
impl RefUnwindSafe for ChatCompletionStreamResponseDelta
impl Send for ChatCompletionStreamResponseDelta
impl Sync for ChatCompletionStreamResponseDelta
impl Unpin for ChatCompletionStreamResponseDelta
impl UnsafeUnpin for ChatCompletionStreamResponseDelta
impl UnwindSafe for ChatCompletionStreamResponseDelta
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