Class: LLM::Repl::Model

Inherits:
Command show all
Defined in:
lib/llm/repl/commands/model.rb

Overview

Switches the active model for the REPL.

See Also:

Instance Attribute Summary

Attributes inherited from Command

#agent, #repl

Instance Method Summary collapse

Methods inherited from 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::Repl::Command

Instance Method Details

#call(model: nil) ⇒ void

This method returns an undefined value.

Parameters:

  • model (String) (defaults to: nil)


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

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