pub struct AudioTranslationRequestBuilder { /* private fields */ }Expand description
表示音频翻译请求构建器。
Implementations§
Source§impl AudioTranslationRequestBuilder
impl AudioTranslationRequestBuilder
pub fn model(self, model: impl Into<String>) -> Self
pub fn file(self, file: UploadSource) -> Self
pub fn prompt(self, prompt: impl Into<String>) -> Self
pub fn response_format(self, response_format: impl Into<String>) -> Self
pub fn temperature(self, temperature: f32) -> Self
pub fn body_value(self, body: impl Into<JsonPayload>) -> Self
pub fn json_body<U>(self, body: &U) -> Result<Self>where
U: Serialize,
pub fn multipart_text( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn multipart_file(self, name: impl Into<String>, file: UploadSource) -> Self
pub fn extra_header( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn extra_query( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn extra_body( self, key: impl Into<String>, value: impl Into<JsonPayload>, ) -> Self
pub fn provider_option( self, key: impl Into<String>, value: impl Into<JsonPayload>, ) -> Self
pub fn timeout(self, timeout: Duration) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
pub fn cancellation_token(self, token: CancellationToken) -> Self
pub async fn send(self) -> Result<AudioTranslation>
pub async fn send_with_meta(self) -> Result<ApiResponse<AudioTranslation>>
pub async fn send_raw(self) -> Result<Response<Bytes>>
Trait Implementations§
Source§impl Clone for AudioTranslationRequestBuilder
impl Clone for AudioTranslationRequestBuilder
Source§fn clone(&self) -> AudioTranslationRequestBuilder
fn clone(&self) -> AudioTranslationRequestBuilder
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 moreAuto Trait Implementations§
impl Freeze for AudioTranslationRequestBuilder
impl !RefUnwindSafe for AudioTranslationRequestBuilder
impl Send for AudioTranslationRequestBuilder
impl Sync for AudioTranslationRequestBuilder
impl Unpin for AudioTranslationRequestBuilder
impl UnsafeUnpin for AudioTranslationRequestBuilder
impl !UnwindSafe for AudioTranslationRequestBuilder
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