pub struct DeltaMessage {
pub content: Option<String>,
pub reasoning: Option<String>,
pub tool_calls: Option<Vec<ToolCallChunk>>,
pub role: Option<Role>,
pub refusal: Option<String>,
pub annotations: Option<Vec<Annotation>>,
pub audio: Option<ChatCompletionAudio>,
}
Fields§
§content: Option<String>
The contents of the message.
reasoning: Option<String>
Open router compatible field https://openrouter.ai/announcements/reasoning-tokens-for-thinking-models
tool_calls: Option<Vec<ToolCallChunk>>
The tool calls generated by the model, such as function calls.
role: Option<Role>
The role of the author of this message.
refusal: Option<String>
The refusal message generated by the model.
annotations: Option<Vec<Annotation>>
Annotations for the message, when applicable, as when using the web search tool.
audio: Option<ChatCompletionAudio>
If the audio output modality is requested, this object contains data about the audio response from the model.
Trait Implementations§
Source§impl Clone for DeltaMessage
impl Clone for DeltaMessage
Source§fn clone(&self) -> DeltaMessage
fn clone(&self) -> DeltaMessage
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 DeltaMessage
impl Debug for DeltaMessage
Source§impl Default for DeltaMessage
impl Default for DeltaMessage
Source§fn default() -> DeltaMessage
fn default() -> DeltaMessage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeltaMessage
impl<'de> Deserialize<'de> for DeltaMessage
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 DeltaMessage
impl PartialEq for DeltaMessage
Source§impl Serialize for DeltaMessage
impl Serialize for DeltaMessage
impl StructuralPartialEq for DeltaMessage
Auto Trait Implementations§
impl Freeze for DeltaMessage
impl RefUnwindSafe for DeltaMessage
impl Send for DeltaMessage
impl Sync for DeltaMessage
impl Unpin for DeltaMessage
impl UnwindSafe for DeltaMessage
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