Class: Roseflow::StabilityAI::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/roseflow/stabilityai/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model_config, provider = nil) ⇒ Model

Returns a new instance of Model.



11
12
13
14
15
# File 'lib/roseflow/stabilityai/model.rb', line 11

def initialize(model_config, provider = nil)
  @model_config = model_config
  @provider = provider
  assign_attributes
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/roseflow/stabilityai/model.rb', line 9

def name
  @name
end

Instance Method Details

#call(operation, options) ⇒ Object



17
18
19
20
# File 'lib/roseflow/stabilityai/model.rb', line 17

def call(operation, options)
  operation = OperationHandler.new(operation, options).call
  ResponseHandler.new(operation, client.post(operation)).call
end