View Source ExOpenAI.Components.RealtimeSession (ex_openai.ex v1.8.0)

Schema representing a RealtimeSession within the OpenAI API

Summary

Types

@type t() :: %ExOpenAI.Components.RealtimeSession{
  id: String.t() | nil,
  input_audio_format: (:g711_alaw | :g711_ulaw | :pcm16) | nil,
  input_audio_transcription: %{model: String.t()} | nil,
  instructions: String.t() | nil,
  max_response_output_tokens: (:inf | integer()) | nil,
  modalities: [:audio | :text] | nil,
  model:
    ((:"gpt-4o-mini-realtime-preview-2024-12-17"
      | :"gpt-4o-mini-realtime-preview"
      | :"gpt-4o-realtime-preview-2024-12-17"
      | :"gpt-4o-realtime-preview-2024-10-01"
      | :"gpt-4o-realtime-preview")
     | String.t())
    | nil,
  output_audio_format: (:g711_alaw | :g711_ulaw | :pcm16) | nil,
  temperature: float() | nil,
  tool_choice: String.t() | nil,
  tools:
    [
      %{
        description: String.t(),
        name: String.t(),
        parameters: map(),
        type: :function
      }
    ]
    | nil,
  turn_detection:
    %{
      create_response: boolean(),
      interrupt_response: boolean(),
      prefix_padding_ms: integer(),
      silence_duration_ms: integer(),
      threshold: float(),
      type: :server_vad
    }
    | nil,
  voice:
    (:verse | :shimmer | :sage | :echo | :coral | :ballad | :ash | :alloy) | nil
}