Skip to main content

ApiFile

Trait ApiFile 

Source
pub trait ApiFile
where Self: ApiBase,
{ // Provided methods fn upload_file( &self, name: &str, content: Vec<u8>, purpose: Purpose, ) -> impl Send + Future<Output = Result<FileObject>> { ... } fn retrieve_file_content( &self, file_id: &str, ) -> impl Send + Future<Output = Result<String>> { ... } }
Expand description

OpenAI files API.

Provided Methods§

Source

fn upload_file( &self, name: &str, content: Vec<u8>, purpose: Purpose, ) -> impl Send + Future<Output = Result<FileObject>>

Upload a file.

Source

fn retrieve_file_content( &self, file_id: &str, ) -> impl Send + Future<Output = Result<String>>

Retrieve a file content by its ID.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> ApiFile for T
where T: ApiBase,