Search documentation of Ragex

# Ragex.AI.Provider.Anthropic (Ragex v0.4.0)

View Source

Anthropic API provider implementation.

Supports Claude 3 models (Opus, Sonnet, Haiku) via the Anthropic API.

## Configuration

    config :ragex, :ai_providers,
      anthropic: [
        endpoint: "https://api.anthropic.com/v1",
        model: "claude-3-sonnet-20240229",
        options: [
          temperature: 0.7,
          max_tokens: 2048
        ]
      ]

## Environment Variables

Requires `ANTHROPIC_API_KEY` to be set.

## Supported Models

- `claude-3-opus-20240229` - Most capable, best for complex tasks
- `claude-3-sonnet-20240229` - Balanced performance and speed
- `claude-3-haiku-20240307` - Fastest, most cost-effective

## API Documentation

https://docs.anthropic.com/claude/reference/