Current section
Files
Jump to
Current section
Files
lib/ai/openai.ex
defmodule AI.OpenAI do
@moduledoc """
OpenAI model helpers.
"""
@doc """
Creates a model that uses the OpenAI Responses API.
Options are stored on the model and passed to the provider. Common options:
- `:base_url` - override the API base URL
- `:api_key` - override the API key
"""
def responses(model_id, opts \\ []) do
%AI.Model{
provider: AI.Providers.OpenAI.Responses,
model_id: model_id,
options: Enum.into(opts, %{})
}
end
end