#[non_exhaustive]pub struct ThreadMessage {Show 15 fields
pub id: String,
pub object: String,
pub created_at: u64,
pub thread_id: String,
pub role: String,
pub content: Vec<Value>,
pub status: Option<String>,
pub incomplete_details: Option<Value>,
pub completed_at: Option<u64>,
pub incomplete_at: Option<u64>,
pub assistant_id: Option<String>,
pub run_id: Option<String>,
pub attachments: Vec<Value>,
pub metadata: BTreeMap<String, String>,
pub extra: BTreeMap<String, Value>,
/* private fields */
}Expand description
EN: Thread message object returned by the Thread Messages API. 中文:Thread Messages API 返回的线程消息对象。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringEN: Message id. 中文:消息 ID。
object: StringEN: API object type. 中文:API 对象类型。
created_at: u64EN: Unix timestamp for creation. 中文:创建时间的 Unix 时间戳。
thread_id: StringEN: Parent thread id. 中文:父线程 ID。
role: StringEN: Message role. 中文:消息角色。
content: Vec<Value>EN: Message content items. 中文:消息内容项。
status: Option<String>EN: Message status, when returned. 中文:消息状态,如响应中存在。
incomplete_details: Option<Value>EN: Incomplete details, when returned. 中文:未完成详情,如响应中存在。
completed_at: Option<u64>EN: Completed timestamp, when returned. 中文:完成时间戳,如响应中存在。
incomplete_at: Option<u64>EN: Incomplete timestamp, when returned. 中文:未完成时间戳,如响应中存在。
assistant_id: Option<String>EN: Assistant id, when returned. 中文:Assistant ID,如响应中存在。
run_id: Option<String>EN: Run id, when returned. 中文:Run ID,如响应中存在。
attachments: Vec<Value>EN: Attachment descriptors returned by the API. 中文:API 返回的附件描述。
metadata: BTreeMap<String, String>EN: Metadata returned by the API. 中文:API 返回的元数据。
extra: BTreeMap<String, Value>EN: Additional fields preserved for forward compatibility. 中文:为前向兼容保留的额外字段。
Implementations§
Source§impl ThreadMessage
impl ThreadMessage
Sourcepub fn request_id(&self) -> Option<&RequestId>
pub fn request_id(&self) -> Option<&RequestId>
EN: Returns the OpenAI request id, when present. 中文:返回 OpenAI 请求 ID,如存在。
Trait Implementations§
Source§impl Clone for ThreadMessage
impl Clone for ThreadMessage
Source§fn clone(&self) -> ThreadMessage
fn clone(&self) -> ThreadMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
Source§impl PartialEq for ThreadMessage
impl PartialEq for ThreadMessage
Source§fn eq(&self, other: &ThreadMessage) -> bool
fn eq(&self, other: &ThreadMessage) -> bool
self and other values to be equal, and is used by ==.