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 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
Auto Trait Implementations§
impl !Freeze for TranslationsRequestBody
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