Skip to main content

gproxy_protocol/protocol/openai/
files.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct FileObject {
5    pub id: String,
6    pub object: String,
7    pub bytes: u64,
8    pub created_at: i64,
9    pub filename: String,
10    pub purpose: String,
11    #[serde(default, skip_serializing_if = "Option::is_none")]
12    pub status: Option<String>,
13    #[serde(default, skip_serializing_if = "Option::is_none")]
14    pub status_details: Option<serde_json::Value>,
15}
16
17#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
18pub struct ListFilesResponse {
19    pub object: String,
20    pub data: Vec<FileObject>,
21    #[serde(default)]
22    pub has_more: bool,
23}
24
25#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
26pub struct CreateFileRequest {
27    pub purpose: String,
28    pub file: String,
29}