openai_struct/models/audio_response_format.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/// pub AudioResponseFormat : The format of the output, in one of these pub options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`, the only supported format is `json`.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16/// # on openapi.yaml
17///
18/// ```yaml
19/// AudioResponseFormat:
20/// description: >
21/// The format of the output, in one of these options: `json`, `text`,
22/// `srt`, `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and
23/// `gpt-4o-mini-transcribe`, the only supported format is `json`.
24/// type: string
25/// enum:
26/// - json
27/// - text
28/// - srt
29/// - verbose_json
30/// - vtt
31/// default: json
32/// ```
33#[derive(Debug, Serialize, Deserialize)]
34#[serde(rename_all = "snake_case")]
35pub enum AudioResponseFormat {
36 Json,
37 Text,
38 Srt,
39 VerboseJson,
40 Vtt,
41}
42
43#[test]
44fn test_snake() {
45 assert_eq!(
46 serde_json::to_string(&AudioResponseFormat::VerboseJson).unwrap(),
47 r#""verbose_json""#,
48 );
49}