Class: LLM::Repl::Command::Compact

Inherits:
Command
  • Object
show all
Defined in:
lib/llm/repl/commands/compact.rb

Overview

The 'compact' 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 Method Summary collapse

Instance Method Details

#call(n: 128) ⇒ void

This method returns an undefined value.



19
20
21
22
23
# File 'lib/llm/repl/commands/compact.rb', line 19

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