#[non_exhaustive]pub struct CreateTranslationRequest {
pub file: AudioUpload,
pub model: String,
pub prompt: Option<String>,
pub response_format: Option<String>,
pub temperature: Option<f32>,
}Expand description
EN: Request body descriptor for POST /v1/audio/translations.
中文:POST /v1/audio/translations 的请求体描述。
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: AudioUploadEN: Audio file to translate. 中文:要翻译的音频文件。
model: StringEN: Translation model id. 中文:翻译模型 ID。
prompt: Option<String>EN: Optional prompt. 中文:可选提示。
response_format: Option<String>EN: Optional response format. 中文:可选响应格式。
temperature: Option<f32>EN: Optional sampling temperature. 中文:可选采样温度。
Implementations§
Source§impl CreateTranslationRequest
impl CreateTranslationRequest
Sourcepub fn builder() -> CreateTranslationRequestBuilder
pub fn builder() -> CreateTranslationRequestBuilder
EN: Starts building a translation request. 中文:开始构建翻译请求。
Trait Implementations§
Source§impl Clone for CreateTranslationRequest
impl Clone for CreateTranslationRequest
Source§fn clone(&self) -> CreateTranslationRequest
fn clone(&self) -> CreateTranslationRequest
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 CreateTranslationRequest
impl Debug for CreateTranslationRequest
Source§impl PartialEq for CreateTranslationRequest
impl PartialEq for CreateTranslationRequest
Source§fn eq(&self, other: &CreateTranslationRequest) -> bool
fn eq(&self, other: &CreateTranslationRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateTranslationRequest
Auto Trait Implementations§
impl !Freeze for CreateTranslationRequest
impl RefUnwindSafe for CreateTranslationRequest
impl Send for CreateTranslationRequest
impl Sync for CreateTranslationRequest
impl Unpin for CreateTranslationRequest
impl UnsafeUnpin for CreateTranslationRequest
impl UnwindSafe for CreateTranslationRequest
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