Codex.Realtime.Config.ModelConfig (Codex SDK v0.7.2)

Copy Markdown View Source

Options for connecting to a realtime model.

Summary

Functions

Build the WebSocket URL with query parameters.

Resolve the API key, calling function if needed.

Types

api_key_fn()

@type api_key_fn() :: (-> String.t())

t()

@type t() :: %Codex.Realtime.Config.ModelConfig{
  api_key: String.t() | api_key_fn() | nil,
  call_id: String.t() | nil,
  headers: %{required(String.t()) => String.t()} | nil,
  initial_model_settings: Codex.Realtime.Config.SessionModelSettings.t() | nil,
  playback_tracker: term() | nil,
  url: String.t() | nil
}

Functions

build_url(config, model_name)

@spec build_url(t(), String.t() | nil) :: String.t()

Build the WebSocket URL with query parameters.

resolve_api_key(model_config)

@spec resolve_api_key(t()) :: String.t() | nil

Resolve the API key, calling function if needed.