pub struct MessageObject {Show 14 fields
pub id: String,
pub object: String,
pub created_at: i64,
pub thread_id: String,
pub status: String,
pub incomplete_details: Option<IncompleteDetails>,
pub completed_at: Option<i64>,
pub incomplete_at: Option<i64>,
pub role: String,
pub content: Vec<MessageContent>,
pub assistant_id: Option<String>,
pub run_id: Option<String>,
pub attachments: Option<Vec<MessageAttachment>>,
pub metadata: Option<Metadata>,
}Expand description
Represents a message within a thread.
§Used By
/threads/{thread_id}/messages(GET - inListMessagesResponse, POST response)/threads/{thread_id}/messages/{message_id}(GET, POST response)AssistantStreamEvent::ThreadMessageCreatedAssistantStreamEvent::ThreadMessageInProgressAssistantStreamEvent::ThreadMessageCompletedAssistantStreamEvent::ThreadMessageIncomplete
Fields§
§id: StringThe identifier, which can be referenced in API endpoints.
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.
status: StringThe status of the message (in_progress, incomplete, or completed).
incomplete_details: Option<IncompleteDetails>Details on why the message is incomplete, if applicable.
completed_at: Option<i64>The Unix timestamp (in seconds) for when the message was completed.
incomplete_at: Option<i64>The Unix timestamp (in seconds) for when the message was marked as incomplete.
role: StringThe entity that produced the message (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>The ID of the run associated with the creation of this message. Null for manually created messages.
attachments: Option<Vec<MessageAttachment>>A list of files attached to the message.
metadata: Option<Metadata>Set of 16 key-value pairs attached to the object.
Trait Implementations§
Source§impl Clone for MessageObject
impl Clone for MessageObject
Source§fn clone(&self) -> MessageObject
fn clone(&self) -> MessageObject
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
Source§impl PartialEq for MessageObject
impl PartialEq for MessageObject
Source§impl Serialize for MessageObject
impl Serialize for MessageObject
impl StructuralPartialEq for MessageObject
Auto Trait Implementations§
impl Freeze for MessageObject
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Source§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
Entry in complex collections.
For example, in a HashMap, while Entry might be a ( key, value ) tuple, Val might only be the value part.Source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry function of the CollectionValToEntry trait to convert the value to an entry.
Source§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Entry is defined by the Collection trait.