Class: OllamaChat::Compaction::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/ollama_chat/compaction.rb

Overview

Value object carrying the outcome of a successful compact! call.

Instance Attribute Summary collapse

Instance Attribute Details

#candidate_sizeString (readonly)

Returns formatted size of the candidate block.

Returns:

  • (String)

    formatted size of the candidate block



45
46
47
48
49
# File 'lib/ollama_chat/compaction.rb', line 45

Result = Data.define(
  :context_before, :context_after,
  :candidates, :candidate_size,
  :summary_size, :stored_total
)

#candidatesInteger (readonly)

Returns number of messages that were summarized.

Returns:

  • (Integer)

    number of messages that were summarized



45
46
47
48
49
# File 'lib/ollama_chat/compaction.rb', line 45

Result = Data.define(
  :context_before, :context_after,
  :candidates, :candidate_size,
  :summary_size, :stored_total
)

#context_afterString (readonly)

Returns formatted context usage after compaction.

Returns:

  • (String)

    formatted context usage after compaction



45
46
47
48
49
# File 'lib/ollama_chat/compaction.rb', line 45

Result = Data.define(
  :context_before, :context_after,
  :candidates, :candidate_size,
  :summary_size, :stored_total
)

#context_beforeString (readonly)

Returns formatted context usage before compaction.

Returns:

  • (String)

    formatted context usage before compaction



45
46
47
48
49
# File 'lib/ollama_chat/compaction.rb', line 45

Result = Data.define(
  :context_before, :context_after,
  :candidates, :candidate_size,
  :summary_size, :stored_total
)

#stored_totalString (readonly)

Returns formatted full conversation length.

Returns:

  • (String)

    formatted full conversation length



45
46
47
48
49
# File 'lib/ollama_chat/compaction.rb', line 45

Result = Data.define(
  :context_before, :context_after,
  :candidates, :candidate_size,
  :summary_size, :stored_total
)

#summary_sizeString (readonly)

Returns formatted size of the generated summary.

Returns:

  • (String)

    formatted size of the generated summary



45
46
47
48
49
# File 'lib/ollama_chat/compaction.rb', line 45

Result = Data.define(
  :context_before, :context_after,
  :candidates, :candidate_size,
  :summary_size, :stored_total
)