#[non_exhaustive]pub struct CreateFileRequest {
pub file: FileUpload,
pub purpose: String,
pub expires_after: Option<FileExpirationPolicy>,
}Expand description
EN: Request body descriptor for POST /v1/files.
中文:POST /v1/files 的请求体描述。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.file: FileUploadEN: File content and filename metadata. 中文:文件内容和文件名元数据。
purpose: StringEN: OpenAI file purpose, such as fine-tune, assistants, or batch.
中文:OpenAI 文件用途,例如 fine-tune、assistants 或 batch。
expires_after: Option<FileExpirationPolicy>EN: Optional expiration policy for supported purposes. 中文:受支持用途的可选过期策略。
Implementations§
Source§impl CreateFileRequest
impl CreateFileRequest
Sourcepub fn builder() -> CreateFileRequestBuilder
pub fn builder() -> CreateFileRequestBuilder
EN: Starts building a file upload request. 中文:开始构建文件上传请求。
Trait Implementations§
Source§impl Clone for CreateFileRequest
impl Clone for CreateFileRequest
Source§fn clone(&self) -> CreateFileRequest
fn clone(&self) -> CreateFileRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateFileRequest
impl Debug for CreateFileRequest
impl Eq for CreateFileRequest
Source§impl PartialEq for CreateFileRequest
impl PartialEq for CreateFileRequest
Source§fn eq(&self, other: &CreateFileRequest) -> bool
fn eq(&self, other: &CreateFileRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateFileRequest
Auto Trait Implementations§
impl !Freeze for CreateFileRequest
impl RefUnwindSafe for CreateFileRequest
impl Send for CreateFileRequest
impl Sync for CreateFileRequest
impl Unpin for CreateFileRequest
impl UnsafeUnpin for CreateFileRequest
impl UnwindSafe for CreateFileRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.