pub struct FileObject {
pub id: String,
pub bytes: i64,
pub created_at: i64,
pub expires_at: Option<i64>,
pub filename: String,
pub object: String,
pub purpose: String,
pub status: Option<String>,
pub status_details: Option<String>,
}Expand description
Represents a document that has been uploaded to OpenAI.
Files are used across several endpoints like Assistants, Fine-tuning, and Batch API.
§Used By
/files(GET - inListFilesResponse, POST response)/files/{file_id}(GET)Upload(withinuploads.rs- as nestedfilefield)DeleteFileResponse(withincommon.rs)
Fields§
§id: StringThe file identifier, which can be referenced in the API endpoints.
bytes: i64The size of the file, in bytes.
created_at: i64The Unix timestamp (in seconds) for when the file was created.
expires_at: Option<i64>The Unix timestamp (in seconds) for when the file will expire (used for temporary files like uploads).
filename: StringThe name of the file.
object: StringThe object type, which is always file.
purpose: StringThe intended purpose of the file (e.g., assistants, fine-tune, vision).
status: Option<String>Deprecated. The current status of the file (uploaded, processed, or error).
status_details: Option<String>Deprecated. For details on fine-tuning validation errors, see the error field on fine_tuning.job.
Trait Implementations§
Source§impl Clone for FileObject
impl Clone for FileObject
Source§fn clone(&self) -> FileObject
fn clone(&self) -> FileObject
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileObject
impl Debug for FileObject
Source§impl<'de> Deserialize<'de> for FileObject
impl<'de> Deserialize<'de> for FileObject
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 FileObject
impl PartialEq for FileObject
Source§impl Serialize for FileObject
impl Serialize for FileObject
impl StructuralPartialEq for FileObject
Auto Trait Implementations§
impl Freeze for FileObject
impl RefUnwindSafe for FileObject
impl Send for FileObject
impl Sync for FileObject
impl Unpin for FileObject
impl UnwindSafe for FileObject
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Source§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
Entry in complex collections.
For example, in a HashMap, while Entry might be a ( key, value ) tuple, Val might only be the value part.Source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry function of the CollectionValToEntry trait to convert the value to an entry.
Source§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Entry is defined by the Collection trait.