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.
Constant Summary collapse
- WEB_SEARCH_TOOL_TYPE =
: String
"web_search_20250305"
Constants inherited from Base
Class Method Summary collapse
-
.skills_adapter(model = nil) ⇒ Object
Returns the XML skill adapter for Anthropic/Claude.
Instance Method Summary collapse
-
#initialize(api_key: nil, **options) ⇒ Anthropic
constructor
– : (?api_key: String?, **untyped) -> void.
Methods inherited from Base
Constructor Details
#initialize(api_key: nil, **options) ⇒ Anthropic
– : (?api_key: String?, **untyped) -> void
19 20 21 22 23 24 25 |
# File 'lib/riffer/providers/anthropic.rb', line 19 def initialize(api_key: nil, **) depends_on "anthropic" api_key ||= Riffer.config.anthropic.api_key @client = ::Anthropic::Client.new(api_key: api_key, **) end |
Class Method Details
.skills_adapter(model = nil) ⇒ Object
Returns the XML skill adapter for Anthropic/Claude.
– : (?String?) -> singleton(Riffer::Skills::Adapter)
13 14 15 |
# File 'lib/riffer/providers/anthropic.rb', line 13 def self.skills_adapter(model = nil) Riffer::Skills::XmlAdapter end |