pub struct Message {
pub id: String,
pub object: String,
pub created_at: i64,
pub thread_id: String,
pub role: String,
pub content: Vec<MessageContent>,
pub assistant_id: Option<String>,
pub run_id: Option<String>,
pub file_ids: Vec<String>,
pub metadata: HashMap<String, String>,
}Expand description
A message object.
Fields§
§id: StringThe identifier of the message.
object: StringThe object type, which is always “thread.message”.
created_at: i64The Unix timestamp (in seconds) for when the message was created.
thread_id: StringThe thread ID that this message belongs to.
role: StringThe role of the entity that created the message.
content: Vec<MessageContent>The content of the message.
assistant_id: Option<String>If applicable, the ID of the assistant that authored this message.
run_id: Option<String>If applicable, the ID of the run associated with the authoring of this message.
file_ids: Vec<String>A list of file IDs that the assistant should use.
metadata: HashMap<String, String>Set of key-value pairs that can be attached to an object.
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 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