pub struct Message {
pub id: String,
pub conversation_id: String,
pub role: String,
pub content: String,
pub metadata: Option<Value>,
pub created_at: i64,
}Expand description
A single message within a conversation.
Fields§
§id: StringUnique identifier for this message.
conversation_id: StringID of the parent conversation.
role: StringRole of the sender (e.g. "user", "assistant", "system").
content: StringText content of the message.
metadata: Option<Value>Arbitrary JSON payload attached to the message.
created_at: i64Unix-millisecond timestamp when the message was created.
Trait Implementations§
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