pub struct Files { /* private fields */ }Expand description
Files API — upload/list/retrieve/delete files and download content.
v1 targets the batch purpose (JSONL input + output files). Select the
upstream with RequestOptions::provider (the floopy-provider
header).
Implementations§
Source§impl Files
impl Files
Sourcepub async fn upload(
&self,
params: FileUploadParams,
req: impl Into<Option<RequestOptions>>,
) -> Result<FileObject>
pub async fn upload( &self, params: FileUploadParams, req: impl Into<Option<RequestOptions>>, ) -> Result<FileObject>
Sourcepub async fn list(
&self,
params: FileListParams,
req: impl Into<Option<RequestOptions>>,
) -> Result<FileList>
pub async fn list( &self, params: FileListParams, req: impl Into<Option<RequestOptions>>, ) -> Result<FileList>
Sourcepub async fn retrieve(
&self,
file_id: &str,
req: impl Into<Option<RequestOptions>>,
) -> Result<FileObject>
pub async fn retrieve( &self, file_id: &str, req: impl Into<Option<RequestOptions>>, ) -> Result<FileObject>
Sourcepub async fn content(
&self,
file_id: &str,
req: impl Into<Option<RequestOptions>>,
) -> Result<Vec<u8>>
pub async fn content( &self, file_id: &str, req: impl Into<Option<RequestOptions>>, ) -> Result<Vec<u8>>
Sourcepub async fn delete(
&self,
file_id: &str,
req: impl Into<Option<RequestOptions>>,
) -> Result<FileObject>
pub async fn delete( &self, file_id: &str, req: impl Into<Option<RequestOptions>>, ) -> Result<FileObject>
Auto Trait Implementations§
impl Freeze for Files
impl !RefUnwindSafe for Files
impl Send for Files
impl Sync for Files
impl Unpin for Files
impl UnsafeUnpin for Files
impl !UnwindSafe for Files
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
Mutably borrows from an owned value. Read more