Class: Roseflow::AI::Model
- Inherits:
-
Object
- Object
- Roseflow::AI::Model
- Defined in:
- lib/roseflow/ai/model.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
- #call(operation, input) ⇒ Object
-
#initialize(name:, provider:) ⇒ Model
constructor
A new instance of Model.
Constructor Details
#initialize(name:, provider:) ⇒ Model
Returns a new instance of Model.
8 9 10 11 12 |
# File 'lib/roseflow/ai/model.rb', line 8 def initialize(name:, provider:) @name = name @provider = provider @model_ = provider.models.find(name) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/roseflow/ai/model.rb', line 6 def name @name end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
6 7 8 |
# File 'lib/roseflow/ai/model.rb', line 6 def provider @provider end |
Instance Method Details
#call(operation, input) ⇒ Object
14 15 16 |
# File 'lib/roseflow/ai/model.rb', line 14 def call(operation, input) @model_.call(operation, input) end |