Class: RubynCode::LLM::Adapters::Base
- Inherits:
-
Object
- Object
- RubynCode::LLM::Adapters::Base
- Defined in:
- lib/rubyn_code/llm/adapters/base.rb
Overview
Abstract base for all LLM provider adapters.
Every adapter must implement #chat, #provider_name, and #models. The Client facade delegates to whichever adapter is active.
Instance Method Summary collapse
- #chat(messages:, model:, max_tokens:, tools: nil, system: nil, on_text: nil, task_budget: nil) ⇒ LLM::Response
-
#models ⇒ Array<String>
Available model identifiers.
-
#provider_name ⇒ String
Provider identifier (e.g. ‘anthropic’, ‘openai’).
Instance Method Details
#chat(messages:, model:, max_tokens:, tools: nil, system: nil, on_text: nil, task_budget: nil) ⇒ LLM::Response
19 20 21 |
# File 'lib/rubyn_code/llm/adapters/base.rb', line 19 def chat(messages:, model:, max_tokens:, tools: nil, system: nil, on_text: nil, task_budget: nil) # rubocop:disable Metrics/ParameterLists -- LLM adapter interface requires these params raise NotImplementedError, "#{self.class}#chat must be implemented" end |
#models ⇒ Array<String>
Returns Available model identifiers.
29 30 31 |
# File 'lib/rubyn_code/llm/adapters/base.rb', line 29 def models raise NotImplementedError, "#{self.class}#models must be implemented" end |
#provider_name ⇒ String
Returns Provider identifier (e.g. ‘anthropic’, ‘openai’).
24 25 26 |
# File 'lib/rubyn_code/llm/adapters/base.rb', line 24 def provider_name raise NotImplementedError, "#{self.class}#provider_name must be implemented" end |