Struct openai_req::files::FileDownloadRequest
source · pub struct FileDownloadRequest { /* private fields */ }
Expand description
Request to download file. More details at https://platform.openai.com/docs/api-reference/files/retrieve-content
Usage example
use openai_req::DownloadRequest;
use openai_req::files::FileDownloadRequest;
let req = FileDownloadRequest::new("{file_id}".to_string());
req.download_to_file(&client, "C:/Downloads/fine-name.ext").await?;
Implementations§
source§impl FileDownloadRequest
impl FileDownloadRequest
pub fn new(file_id: String) -> FileDownloadRequest
Trait Implementations§
source§impl Clone for FileDownloadRequest
impl Clone for FileDownloadRequest
source§fn clone(&self) -> FileDownloadRequest
fn clone(&self) -> FileDownloadRequest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FileDownloadRequest
impl Debug for FileDownloadRequest
source§impl<'de> Deserialize<'de> for FileDownloadRequest
impl<'de> Deserialize<'de> for FileDownloadRequest
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>,
Deserialize this value from the given Serde deserializer. Read more