openai_struct/models/create_translation_request.rs
1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11#[allow(unused_imports)]
12use serde_json::Value;
13
14#[derive(Debug, Serialize, Deserialize)]
15pub struct CreateTranslationRequest {
16 /// The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
17 #[serde(rename = "file")]
18 pub file: Vec<u8>,
19 /// ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.
20 #[serde(rename = "model")]
21 pub model: Value,
22 /// An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text#prompting) should be in English.
23 #[serde(rename = "prompt")]
24 pub prompt: Option<String>,
25 /// The format of the output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
26 #[serde(rename = "response_format")]
27 pub response_format: Option<String>,
28 /// 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](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
29 #[serde(rename = "temperature")]
30 pub temperature: Option<f32>,
31}