async_openai/types/
message_file.rs

1use serde::{Deserialize, Serialize};
2
3/// A list of files attached to a `message`.
4#[derive(Clone, Serialize, Default, Debug, Deserialize, PartialEq)]
5pub struct MessageFileObject {
6    /// The identifier, which can be referenced in API endpoints.
7    pub id: String,
8
9    /// The object type, which is always `thread.message.file`.
10    pub object: String,
11
12    /// The Unix timestamp (in seconds) for when the message file was created.
13    pub created_at: i32,
14
15    /// The ID of the [message](https://platform.openai.com/docs/api-reference/messages) that the [File](https://platform.openai.com/docs/api-reference/files) is attached to.
16    pub message_id: String,
17}
18
19#[derive(Clone, Serialize, Default, Debug, Deserialize, PartialEq)]
20pub struct ListMessageFilesResponse {
21    pub object: String,
22    pub data: Vec<MessageFileObject>,
23    pub first_id: Option<String>,
24    pub last_id: Option<String>,
25    pub has_more: bool,
26}