Class: ActiveAgent::Providers::Base
- Inherits:
-
Object
- Object
- ActiveAgent::Providers::Base
- Defined in:
- lib/active_agent/providers/base.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#api_url ⇒ Object
readonly
Returns the value of attribute api_url.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #chat(messages:, tools: []) ⇒ Object
-
#initialize(model:, api_key: nil, api_url: nil) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(model:, api_key: nil, api_url: nil) ⇒ Base
Returns a new instance of Base.
12 13 14 15 16 |
# File 'lib/active_agent/providers/base.rb', line 12 def initialize(model:, api_key: nil, api_url: nil) @model = model @api_key = api_key @api_url = api_url end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/active_agent/providers/base.rb', line 10 def api_key @api_key end |
#api_url ⇒ Object (readonly)
Returns the value of attribute api_url.
10 11 12 |
# File 'lib/active_agent/providers/base.rb', line 10 def api_url @api_url end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
10 11 12 |
# File 'lib/active_agent/providers/base.rb', line 10 def model @model end |
Instance Method Details
#chat(messages:, tools: []) ⇒ Object
18 19 20 |
# File 'lib/active_agent/providers/base.rb', line 18 def chat(messages:, tools: []) raise NotImplementedError, "#{self.class.name}#chat must be implemented" end |