Omni.Providers.OpenAI (Omni v1.4.0)

Copy Markdown View Source

Provider for the OpenAI API, using the Omni.Dialects.OpenAIResponses dialect.

Loaded by default. Reads the API key from the OPENAI_API_KEY environment variable — no configuration is needed if the variable is set.

Configuration

Override the default API key or base URL via application config:

config :omni, Omni.Providers.OpenAI,
  api_key: {:system, "MY_OPENAI_KEY"}

Any key from the provider's config/0 can be overridden: :api_key, :base_url. See Omni.Provider for details.