pub struct Translations<'c, C: Config> { /* private fields */ }Available on crate feature
audio only.Implementations§
Source§impl<'c, C: Config> Translations<'c, C>
impl<'c, C: Config> Translations<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub async fn create(
&self,
request: CreateTranslationRequest,
) -> Result<CreateTranslationResponseJson, OpenAIError>
pub async fn create( &self, request: CreateTranslationRequest, ) -> Result<CreateTranslationResponseJson, OpenAIError>
Translates audio into English. Translates audio into English.
Sourcepub async fn create_byot<T0: Clone, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_byot<T0: Clone, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
Translates audio into English.
Sourcepub async fn create_verbose_json(
&self,
request: CreateTranslationRequest,
) -> Result<CreateTranslationResponseVerboseJson, OpenAIError>
pub async fn create_verbose_json( &self, request: CreateTranslationRequest, ) -> Result<CreateTranslationResponseVerboseJson, OpenAIError>
Translates audio into English. Translates audio into English.
Sourcepub async fn create_verbose_json_byot<T0: Clone, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_verbose_json_byot<T0: Clone, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
Translates audio into English.
Sourcepub async fn create_raw(
&self,
request: CreateTranslationRequest,
) -> Result<Bytes, OpenAIError>
pub async fn create_raw( &self, request: CreateTranslationRequest, ) -> Result<Bytes, OpenAIError>
Transcribes audio into the input language.
Trait Implementations§
Source§impl<'c, C: Config> RequestOptionsBuilder for Translations<'c, C>
Available on crate feature _api only.
impl<'c, C: Config> RequestOptionsBuilder for Translations<'c, C>
Available on crate feature
_api only.Source§fn options_mut(&mut self) -> &mut RequestOptions
fn options_mut(&mut self) -> &mut RequestOptions
Get mutable reference to RequestOptions (for building)
Source§fn options(&self) -> &RequestOptions
fn options(&self) -> &RequestOptions
Get reference to RequestOptions
Source§fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
Add a single header to RequestOptions
Auto Trait Implementations§
impl<'c, C> Freeze for Translations<'c, C>
impl<'c, C> !RefUnwindSafe for Translations<'c, C>
impl<'c, C> Send for Translations<'c, C>
impl<'c, C> Sync for Translations<'c, C>
impl<'c, C> Unpin for Translations<'c, C>
impl<'c, C> !UnwindSafe for Translations<'c, C>
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