Class: Rixie::CLI::Commands::Model

Inherits:
Base
  • Object
show all
Defined in:
lib/rixie/cli/commands/model.rb

Instance Method Summary collapse

Methods inherited from Base

#complete, #initialize

Constructor Details

This class inherits a constructor from Rixie::CLI::Commands::Base

Instance Method Details

#call(arg, cli:) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/rixie/cli/commands/model.rb', line 11

def call(arg, cli:)
  if arg && !arg.empty?
    new_model = arg.strip
    return if new_model.empty?

    cli.switch_model(new_model)
    renderer.success("Model set to #{renderer.bold(new_model)}")
  else
    renderer.info("Current", cli.current_model)
  end
end

#descriptionObject



9
# File 'lib/rixie/cli/commands/model.rb', line 9

def description = "Switch LLM model"

#nameObject



7
# File 'lib/rixie/cli/commands/model.rb', line 7

def name = "model"