pub struct ChatCompletionMessage {
pub role: ResponseRole,
pub content: Option<String>,
pub reasoning_content: Option<String>,
pub tool_calls: Option<Vec<ChatCompletionMessageToolCall>>,
}
Expand description
Fields that are not supported yet:
- audio: If the audio output modality is requested, this object contains data about the audio response from the model. Learn more from OpenAI.
Fields§
§role: ResponseRole
The role of the author of this message. This shall always be ResponseRole::Assistant
content: Option<String>
The contents of the message.
reasoning_content: Option<String>
§tool_calls: Option<Vec<ChatCompletionMessageToolCall>>
The tool calls generated by the model, such as function calls. Tool calls deserialization is not supported yet.
Trait Implementations§
Source§impl Debug for ChatCompletionMessage
impl Debug for ChatCompletionMessage
Source§impl<'de> Deserialize<'de> for ChatCompletionMessage
impl<'de> Deserialize<'de> for ChatCompletionMessage
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 ChatCompletionMessage
impl RefUnwindSafe for ChatCompletionMessage
impl Send for ChatCompletionMessage
impl Sync for ChatCompletionMessage
impl Unpin for ChatCompletionMessage
impl UnwindSafe for ChatCompletionMessage
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