Class: OmniAgent::Providers::Base
- Inherits:
-
Object
- Object
- OmniAgent::Providers::Base
- Defined in:
- lib/omni_agent/providers/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #chat(messages:, tools: [], **_options) ⇒ Object
-
#initialize(api_key: nil, model: nil) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(api_key: nil, model: nil) ⇒ Base
Returns a new instance of Base.
7 8 9 10 |
# File 'lib/omni_agent/providers/base.rb', line 7 def initialize(api_key: nil, model: nil) @api_key = api_key || default_api_key @model = model || default_model end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
5 6 7 |
# File 'lib/omni_agent/providers/base.rb', line 5 def model @model end |
Instance Method Details
#chat(messages:, tools: [], **_options) ⇒ Object
12 13 14 |
# File 'lib/omni_agent/providers/base.rb', line 12 def chat(messages:, tools: [], **) raise NotImplementedError, "Providers must implement #chat" end |