Class: Brute::Providers::Shell::ModelList
- Inherits:
-
Object
- Object
- Brute::Providers::Shell::ModelList
- Defined in:
- lib/brute/providers/shell.rb
Overview
Minimal object that quacks like provider.models so the REPL’s fetch_models can call provider.models.all.select(&:chat?).
Defined Under Namespace
Classes: ModelEntry
Instance Method Summary collapse
- #all ⇒ Object
-
#initialize(names) ⇒ ModelList
constructor
A new instance of ModelList.
Constructor Details
#initialize(names) ⇒ ModelList
Returns a new instance of ModelList.
98 99 100 |
# File 'lib/brute/providers/shell.rb', line 98 def initialize(names) @entries = names.map { |n| ModelEntry.new(id: n, chat?: true) } end |
Instance Method Details
#all ⇒ Object
102 103 104 |
# File 'lib/brute/providers/shell.rb', line 102 def all @entries end |