pub struct CreateFileRequest {
pub file: PathBuf,
pub purpose: FilePurpose,
pub expires_after: Option<ExpiresAfter>,
pub extra_body: Option<Map<String, Value>>,
}Expand description
Upload a file that can be used across various endpoints.
Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 1 TB.
The Assistants API supports files up to 2 million tokens and of specific file types. See the OpenAI Assistants Tools guide for details.
The Fine-tuning API only supports .jsonl files. The input also has certain
required formats for fine-tuning
chat or
completions
models.
The Batch API only supports .jsonl files up to 200 MB in size. The input also
has a specific required
format.
Please contact OpenAI if you need to increase these storage limits.
Fields§
§file: PathBufThe File object (not file name) to be uploaded.
purpose: FilePurposeThe intended purpose of the uploaded file. One of: - assistants: Used in the
Assistants API - batch: Used in the Batch API - fine-tune: Used for
fine-tuning - vision: Images used for vision fine-tuning - user_data:
Flexible file type for any purpose - evals: Used for eval data sets
expires_after: Option<ExpiresAfter>The expiration policy for a file. By default, files with purpose=batch expire
after 30 days and all other files are persisted until they are manually deleted.
extra_body: Option<Map<String, Value>>Trait Implementations§
Source§impl Clone for CreateFileRequest
impl Clone for CreateFileRequest
Source§fn clone(&self) -> CreateFileRequest
fn clone(&self) -> CreateFileRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more