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.
Constant Summary collapse
- WEB_SEARCH_TOOL_TYPE =
: String
"web_search_20250305"
Constants inherited from Base
Class Method Summary collapse
-
.skills_adapter ⇒ Object
Returns the XML skill adapter for Anthropic/Claude.
Instance Method Summary collapse
-
#initialize(api_key: nil, **options) ⇒ Anthropic
constructor
Initializes the Anthropic provider.
Methods inherited from Base
Methods included from Messages::Converter
#convert_to_file_part, #convert_to_message_object
Methods included from Helpers::Dependencies
Constructor Details
#initialize(api_key: nil, **options) ⇒ Anthropic
Initializes the Anthropic provider.
– : (?api_key: String?, **untyped) -> void
24 25 26 27 28 29 30 |
# File 'lib/riffer/providers/anthropic.rb', line 24 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 ⇒ Object
Returns the XML skill adapter for Anthropic/Claude.
– : () -> singleton(Riffer::Skills::Adapter)
16 17 18 |
# File 'lib/riffer/providers/anthropic.rb', line 16 def self.skills_adapter Riffer::Skills::XmlAdapter end |