pub struct ChatCompletionStreamResponseDelta {
pub content: Option<String>,
pub function_call: Option<FunctionCallStream>,
pub tool_calls: Option<Vec<ChatCompletionMessageToolCallChunk>>,
pub role: Option<Role>,
pub refusal: Option<String>,
}
Expand description
A chat completion delta generated by streamed model responses.
Fields§
§content: Option<String>
The contents of the chunk message.
function_call: Option<FunctionCallStream>
👎Deprecated
Deprecated and replaced by tool_calls
. The name and arguments of a function that should be called, as generated by the model.
tool_calls: Option<Vec<ChatCompletionMessageToolCallChunk>>
§role: Option<Role>
The role of the author of this message.
refusal: Option<String>
The refusal message generated by the model.
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 · 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
Source§impl PartialEq for ChatCompletionStreamResponseDelta
impl PartialEq for ChatCompletionStreamResponseDelta
Source§fn eq(&self, other: &ChatCompletionStreamResponseDelta) -> bool
fn eq(&self, other: &ChatCompletionStreamResponseDelta) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ChatCompletionStreamResponseDelta
Auto Trait Implementations§
impl Freeze for ChatCompletionStreamResponseDelta
impl RefUnwindSafe for ChatCompletionStreamResponseDelta
impl Send for ChatCompletionStreamResponseDelta
impl Sync for ChatCompletionStreamResponseDelta
impl Unpin 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