#[non_exhaustive]pub struct ThreadMessage {Show 14 fields
pub id: String,
pub thread_id: String,
pub created_at: i64,
pub object: String,
pub role: String,
pub status: Option<String>,
pub content: Vec<MessageContentBlock>,
pub assistant_id: Option<String>,
pub run_id: Option<String>,
pub attachments: Option<Vec<Value>>,
pub completed_at: Option<i64>,
pub incomplete_at: Option<i64>,
pub incomplete_details: Option<Value>,
pub metadata: Option<Value>,
}Expand description
A message on a thread, mirroring types/beta/threads/message.py.
Named ThreadMessage to avoid colliding with the chat-completions
Message request type.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: String§thread_id: String§created_at: i64§object: String§role: String§status: Option<String>§content: Vec<MessageContentBlock>§assistant_id: Option<String>§run_id: Option<String>§attachments: Option<Vec<Value>>§completed_at: Option<i64>§incomplete_at: Option<i64>§incomplete_details: Option<Value>§metadata: Option<Value>Implementations§
Trait Implementations§
Source§impl Clone for ThreadMessage
impl Clone for ThreadMessage
Source§fn clone(&self) -> ThreadMessage
fn clone(&self) -> ThreadMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ThreadMessage
impl Debug for ThreadMessage
Source§impl<'de> Deserialize<'de> for ThreadMessage
impl<'de> Deserialize<'de> for ThreadMessage
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 ThreadMessage
impl RefUnwindSafe for ThreadMessage
impl Send for ThreadMessage
impl Sync for ThreadMessage
impl Unpin for ThreadMessage
impl UnsafeUnpin for ThreadMessage
impl UnwindSafe for ThreadMessage
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