Class: Legion::CLI::Chat::Tools::ModelComparison

Inherits:
RubyLLM::Tool
  • Object
show all
Defined in:
lib/legion/cli/chat/tools/model_comparison.rb

Instance Method Summary collapse

Instance Method Details

#execute(models: nil, tokens: 1000) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/legion/cli/chat/tools/model_comparison.rb', line 20

def execute(models: nil, tokens: 1000)
  pricing = load_pricing
  selected = filter_models(pricing, models)
  return 'No matching models found.' if selected.empty?

  format_comparison(selected, tokens.to_i)
end