Class: Lluminary::Providers::Base
- Inherits:
-
Object
- Object
- Lluminary::Providers::Base
- Defined in:
- lib/lluminary/providers/base.rb
Overview
Base class for all LLM providers. Defines the interface that all providers must implement.
Constant Summary collapse
- NAME =
The symbolic name of the provider. Must be overridden by subclasses.
:base
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #call(prompt, task) ⇒ Object
-
#initialize(**config_overrides) ⇒ Base
constructor
A new instance of Base.
- #models ⇒ Object
Constructor Details
#initialize(**config_overrides) ⇒ Base
Returns a new instance of Base.
13 14 15 |
# File 'lib/lluminary/providers/base.rb', line 13 def initialize(**config_overrides) @config = default_provider_config.merge(config_overrides) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
11 12 13 |
# File 'lib/lluminary/providers/base.rb', line 11 def config @config end |
Instance Method Details
#call(prompt, task) ⇒ Object
17 18 19 |
# File 'lib/lluminary/providers/base.rb', line 17 def call(prompt, task) raise NotImplementedError, "Subclasses must implement #call" end |
#models ⇒ Object
21 22 23 |
# File 'lib/lluminary/providers/base.rb', line 21 def models raise NotImplementedError, "Subclasses must implement #models" end |