Class: Riffer::Providers::Anthropic
- Defined in:
- lib/riffer/providers/anthropic.rb
Overview
Anthropic provider for Claude models via the Anthropic API.
Requires the anthropic gem to be installed.
Instance Method Summary collapse
-
#initialize(api_key: nil, **options) ⇒ Anthropic
constructor
Initializes the Anthropic provider.
Methods inherited from Base
Methods included from Messages::Converter
Constructor Details
#initialize(api_key: nil, **options) ⇒ Anthropic
Initializes the Anthropic provider.
- api_key
-
String or nil - Anthropic API key
- options
-
Hash - additional options passed to Anthropic::Client
15 16 17 18 19 20 21 |
# File 'lib/riffer/providers/anthropic.rb', line 15 def initialize(api_key: nil, **) depends_on "anthropic" api_key ||= Riffer.config.anthropic.api_key @client = Anthropic::Client.new(api_key: api_key, **) end |