Struct oaapi::audio::TranslationsRequestBody
source · pub struct TranslationsRequestBody {
pub file: File,
pub model: AudioModel,
pub prompt: Option<Prompt>,
pub temperature: Option<Temperature>,
}Expand description
The request boyd for the /audio/translations endpoint.
Fields§
§file: FileThe audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
model: AudioModelID of the model to use. Only whisper-1 is currently available.
prompt: Option<Prompt>An optional text to guide the model’s style or continue a previous audio segment. The prompt should match the audio language.
temperature: Option<Temperature>The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
Implementations§
source§impl TranslationsRequestBody
impl TranslationsRequestBody
sourcepub fn new(
file: File,
model: AudioModel,
prompt: Option<Prompt>,
temperature: Option<Temperature>
) -> Self
pub fn new( file: File, model: AudioModel, prompt: Option<Prompt>, temperature: Option<Temperature> ) -> Self
Creates a new TranslationsRequestBody.
Trait Implementations§
source§impl Clone for TranslationsRequestBody
impl Clone for TranslationsRequestBody
source§fn clone(&self) -> TranslationsRequestBody
fn clone(&self) -> TranslationsRequestBody
Returns a copy 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 TranslationsRequestBody
impl Debug for TranslationsRequestBody
source§impl Default for TranslationsRequestBody
impl Default for TranslationsRequestBody
source§fn default() -> TranslationsRequestBody
fn default() -> TranslationsRequestBody
Returns the “default value” for a type. Read more
source§impl Display for TranslationsRequestBody
impl Display for TranslationsRequestBody
source§impl PartialEq for TranslationsRequestBody
impl PartialEq for TranslationsRequestBody
source§fn eq(&self, other: &TranslationsRequestBody) -> bool
fn eq(&self, other: &TranslationsRequestBody) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for TranslationsRequestBody
Auto Trait Implementations§
impl RefUnwindSafe for TranslationsRequestBody
impl Send for TranslationsRequestBody
impl Sync for TranslationsRequestBody
impl Unpin for TranslationsRequestBody
impl UnwindSafe for TranslationsRequestBody
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