pub struct Message {
pub content: MessageContent,
pub reasoning: Option<String>,
pub reasoning_content: Option<String>,
pub role: MessageRole,
pub tool_call_id: Option<String>,
pub tool_calls: Vec<ChatCompletionMessageToolCall>,
}Expand description
Message structure for provider requests
JSON schema
{
"description": "Message structure for provider requests",
"type": "object",
"required": [
"content",
"role"
],
"properties": {
"content": {
"$ref": "#/definitions/MessageContent"
},
"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"
},
"role": {
"$ref": "#/definitions/MessageRole"
},
"tool_call_id": {
"type": "string"
},
"tool_calls": {
"type": "array",
"items": {
"$ref": "#/definitions/ChatCompletionMessageToolCall"
}
}
}
}Fields§
§content: MessageContent§reasoning: Option<String>The reasoning of the chunk message. Same as reasoning_content.
reasoning_content: Option<String>The reasoning content of the chunk message.
role: MessageRole§tool_call_id: Option<String>§tool_calls: Vec<ChatCompletionMessageToolCall>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
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin 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