Class: LLM::Console::Command::Model

Inherits:
LLM::Console::Command show all
Defined in:
lib/llm/console/commands/model.rb

Overview

Switches the active model for the REPL.

Instance Attribute Summary

Attributes inherited from LLM::Console::Command

#agent, #repl

Instance Method Summary collapse

Methods inherited from LLM::Console::Command

complete, description, find_by, help, inherited, #initialize, name, parameter, #parameters, parameters, registry, required, #write, #write_message

Constructor Details

This class inherits a constructor from LLM::Console::Command

Instance Method Details

#call(model: nil)

This method returns an undefined value.

Parameters:

  • model (String) (defaults to: nil)


15
16
17
18
# File 'lib/llm/console/commands/model.rb', line 15

def call(model: nil)
  repl.model = model
  write [Node.new("model changed to "), Node.new(model, Color.red)]
end