1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* OpenAI API
*
* The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
*
* The version of the OpenAPI document: 2.3.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// SessionConfiguration : Session configuration to use for the client secret. Choose either a realtime session or a transcription session.
/// Session configuration to use for the client secret. Choose either a realtime session or a transcription session.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum SessionConfiguration {
RealtimeSessionCreateRequestGa(Box<models::RealtimeSessionCreateRequestGa>),
RealtimeTranscriptionSessionCreateRequestGa(
Box<models::RealtimeTranscriptionSessionCreateRequestGa>,
),
}
/// The type of session to create. Always `realtime` for the Realtime API.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "realtime")]
Realtime,
#[serde(rename = "transcription")]
Transcription,
}
impl Default for Type {
fn default() -> Type {
Self::Realtime
}
}
/// The set of modalities the model can respond with. It defaults to `[\"audio\"]`, indicating that the model will respond with audio plus a transcript. `[\"text\"]` can be used to make the model respond with text only. It is not possible to request both `text` and `audio` at the same time.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OutputModalities {
#[serde(rename = "text")]
Text,
#[serde(rename = "audio")]
Audio,
}
impl Default for OutputModalities {
fn default() -> OutputModalities {
Self::Text
}
}
/// Additional fields to include in server outputs. `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Include {
#[serde(rename = "item.input_audio_transcription.logprobs")]
ItemInputAudioTranscriptionLogprobs,
}
impl Default for Include {
fn default() -> Include {
Self::ItemInputAudioTranscriptionLogprobs
}
}