pub struct Message {
pub role: Role,
pub content: String,
pub tool_calls: Vec<ToolCall>,
pub tool_results: Vec<ToolCallResult>,
pub timestamp: DateTime<Utc>,
}Expand description
A message in a bout (conversation).
Fields§
§role: RoleThe role of the message sender.
content: StringText content of the message (may be empty for tool-only messages).
tool_calls: Vec<ToolCall>Tool calls requested by the assistant.
tool_results: Vec<ToolCallResult>Results from tool executions (for role = Tool).
timestamp: DateTime<Utc>When the message was created.
Implementations§
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