Class: BruteCLI::Providers::Shell::ModelList
- Inherits:
-
Object
- Object
- BruteCLI::Providers::Shell::ModelList
- Defined in:
- lib/brute_cli/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.
88 89 90 |
# File 'lib/brute_cli/providers/shell.rb', line 88 def initialize(names) @entries = names.map { |n| ModelEntry.new(id: n, chat?: true) } end |
Instance Method Details
#all ⇒ Object
92 93 94 |
# File 'lib/brute_cli/providers/shell.rb', line 92 def all @entries end |