Class: Roseflow::OpenRouter::ModelRepository
- Inherits:
-
Object
- Object
- Roseflow::OpenRouter::ModelRepository
- Defined in:
- lib/roseflow/open_router/model_repository.rb
Instance Attribute Summary collapse
-
#models ⇒ Object
readonly
Returns the value of attribute models.
Instance Method Summary collapse
- #find(name) ⇒ Object
-
#initialize(provider) ⇒ ModelRepository
constructor
A new instance of ModelRepository.
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
#models ⇒ Object (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 |