Class: LLM::Console::Command::Keep

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

Overview

The 'keep' command frees space in the context window and llm.rb is designed to support multiple compaction strategies with different trade offs. This command, though, uses the 'truncate' strategy. See LLM::Compactor::Truncate for more details.

Instance Attribute Summary

Attributes inherited from LLM::Console::Command

#agent, #repl

Instance Method Summary collapse

Methods inherited from LLM::Console::Command

complete, #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(n:)

This method returns an undefined value.



21
22
23
24
25
# File 'lib/llm/console/commands/keep.rb', line 21

def call(n:)
  write "keep in progress"
  compactor.call(keep: n)
  write "keep complete"
end