Current section
Files
Jump to
Current section
Files
lib/ai/anthropic.ex
defmodule AI.Anthropic do
@moduledoc """
Anthropic model helpers.
"""
@doc """
Creates a model that uses the Anthropic Messages 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
- `:version` - override the Anthropic API version header
"""
def messages(model_id, opts \\ []) do
%AI.Model{
provider: AI.Providers.Anthropic.Messages,
model_id: model_id,
options: Enum.into(opts, %{})
}
end
end