Class: RubynCode::LLM::Adapters::AnthropicCompatible
- Defined in:
- lib/rubyn_code/llm/adapters/anthropic_compatible.rb
Overview
Adapter for Anthropic-compatible providers that use the Messages API format.
Inherits all Anthropic logic but overrides the base URL, provider name, available models, and API key resolution.
Constant Summary
Constants inherited from Anthropic
RubynCode::LLM::Adapters::Anthropic::ANTHROPIC_VERSION, RubynCode::LLM::Adapters::Anthropic::API_URL, RubynCode::LLM::Adapters::Anthropic::AVAILABLE_MODELS, RubynCode::LLM::Adapters::Anthropic::MAX_RETRIES, RubynCode::LLM::Adapters::Anthropic::RETRY_DELAYS
Constants included from PromptCaching
PromptCaching::CACHE_EPHEMERAL, PromptCaching::OAUTH_GATE
Instance Method Summary collapse
-
#initialize(provider:, base_url:, api_key: nil, available_models: []) ⇒ AnthropicCompatible
constructor
A new instance of AnthropicCompatible.
- #models ⇒ Object
- #provider_name ⇒ Object
Methods inherited from Anthropic
Methods inherited from Base
Constructor Details
#initialize(provider:, base_url:, api_key: nil, available_models: []) ⇒ AnthropicCompatible
Returns a new instance of AnthropicCompatible.
11 12 13 14 15 16 17 |
# File 'lib/rubyn_code/llm/adapters/anthropic_compatible.rb', line 11 def initialize(provider:, base_url:, api_key: nil, available_models: []) super() @provider = provider @base_url = base_url @api_key = api_key @available_models = available_models.freeze end |
Instance Method Details
#models ⇒ Object
23 24 25 |
# File 'lib/rubyn_code/llm/adapters/anthropic_compatible.rb', line 23 def models @available_models end |
#provider_name ⇒ Object
19 20 21 |
# File 'lib/rubyn_code/llm/adapters/anthropic_compatible.rb', line 19 def provider_name @provider end |