openai-client-base 0.12.0

Auto-generated Rust client for the OpenAI API
/*
 * 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
    }
}