View Source Instructor.Adapters.Anthropic (Instructor v0.1.0)

Anthropic adapter for Instructor.

Configuration

config :instructor, adapter: Instructor.Adapters.Anthropic, anthropic: [
  api_key: "your_api_key" # Will use ANTHROPIC_API_KEY environment variable if not provided
]

or at runtime:

Instructor.chat_completion(..., [
  adapter: Instructor.Adapters.Anthropic,
  api_key: "your_api_key" # Will use ANTHROPIC_API_KEY environment variable if not provided
])

To get an Anthropic API key, see Anthropic.