Class: Roseflow::StabilityAI::ModelRepository

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider) ⇒ ModelRepository

Returns a new instance of ModelRepository.



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

def initialize(provider)
  @provider = provider
  @models = load_models
end

Instance Attribute Details

#modelsObject (readonly)

Returns the value of attribute models.



8
9
10
# File 'lib/roseflow/stabilityai/model_repository.rb', line 8

def models
  @models
end

Instance Method Details

#find(name) ⇒ Object



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

def find(name)
  @models.select { |model| model.name == name }.first
end