Struct async_openai::types::MessageObject
source · pub struct MessageObject {
pub id: String,
pub object: String,
pub created_at: i32,
pub thread_id: String,
pub role: MessageRole,
pub content: Vec<MessageContent>,
pub assistant_id: Option<String>,
pub run_id: Option<String>,
pub file_ids: Vec<String>,
pub metadata: Option<HashMap<String, Value>>,
}
Expand description
Represents a message within a thread.
Fields§
§id: String
The identifier, which can be referenced in API endpoints.
object: String
The object type, which is always thread.message
.
created_at: i32
The Unix timestamp (in seconds) for when the message was created.
thread_id: String
The thread ID that this message belongs to.
role: MessageRole
The entity that produced the message. One of user
or assistant
.
content: Vec<MessageContent>
The content of the message in array of text and/or images.
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. Useful for tools like retrieval and code_interpreter that can access files. A maximum of 10 files can be attached to a message.
metadata: Option<HashMap<String, Value>>
Trait Implementations§
source§impl Clone for MessageObject
impl Clone for MessageObject
source§fn clone(&self) -> MessageObject
fn clone(&self) -> MessageObject
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MessageObject
impl Debug for MessageObject
source§impl<'de> Deserialize<'de> for MessageObject
impl<'de> Deserialize<'de> for MessageObject
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
source§impl PartialEq for MessageObject
impl PartialEq for MessageObject
source§fn eq(&self, other: &MessageObject) -> bool
fn eq(&self, other: &MessageObject) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MessageObject
impl Serialize for MessageObject
impl StructuralPartialEq for MessageObject
Auto Trait Implementations§
impl RefUnwindSafe for MessageObject
impl Send for MessageObject
impl Sync for MessageObject
impl Unpin for MessageObject
impl UnwindSafe for MessageObject
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