Class: Roseflow::OpenRouter::ModelRepository

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider) ⇒ ModelRepository

Returns a new instance of ModelRepository.



10
11
12
13
# File 'lib/roseflow/open_router/model_repository.rb', line 10

def initialize(provider)
  @provider = provider
  @models = provider.client.models
end

Instance Attribute Details

#modelsObject (readonly)

Returns the value of attribute models.



6
7
8
# File 'lib/roseflow/open_router/model_repository.rb', line 6

def models
  @models
end

Instance Method Details

#find(name) ⇒ Object



15
16
17
# File 'lib/roseflow/open_router/model_repository.rb', line 15

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