Class: OmniAgent::Providers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/omni_agent/providers/base.rb

Direct Known Subclasses

OpenAI

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#modelObject (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

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/omni_agent/providers/base.rb', line 12

def chat(messages:, tools: [], **_options)
  raise NotImplementedError, "Providers must implement #chat"
end