pub struct CreateUploadRequestArgs { /* private fields */ }
Expand description
Builder for CreateUploadRequest
.
Implementations§
Source§impl CreateUploadRequestArgs
impl CreateUploadRequestArgs
Sourcepub fn filename<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn filename<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The name of the file to upload.
Sourcepub fn purpose<VALUE: Into<UploadPurpose>>(&mut self, value: VALUE) -> &mut Self
pub fn purpose<VALUE: Into<UploadPurpose>>(&mut self, value: VALUE) -> &mut Self
The intended purpose of the uploaded file.
See the documentation on File purposes.
Sourcepub fn bytes<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
pub fn bytes<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
The number of bytes in the file you are uploading.
Sourcepub fn mime_type<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn mime_type<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The MIME type of the file.
This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision.
Sourcepub fn build(&self) -> Result<CreateUploadRequest, OpenAIError>
pub fn build(&self) -> Result<CreateUploadRequest, OpenAIError>
Trait Implementations§
Source§impl Clone for CreateUploadRequestArgs
impl Clone for CreateUploadRequestArgs
Source§fn clone(&self) -> CreateUploadRequestArgs
fn clone(&self) -> CreateUploadRequestArgs
Returns a duplicate 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 CreateUploadRequestArgs
impl Debug for CreateUploadRequestArgs
Auto Trait Implementations§
impl Freeze for CreateUploadRequestArgs
impl RefUnwindSafe for CreateUploadRequestArgs
impl Send for CreateUploadRequestArgs
impl Sync for CreateUploadRequestArgs
impl Unpin for CreateUploadRequestArgs
impl UnwindSafe for CreateUploadRequestArgs
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