pub struct Message {
pub content: Option<String>,
pub reasoning: Option<String>,
pub tool_calls: Option<Vec<ToolCall>>,
pub role: 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<ToolCall>>The tool calls generated by the model, such as function calls.
role: RoleThe 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<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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