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_size ⇒ String (readonly)

Returns formatted size of the candidate block.

Returns:

  • (String) —

    formatted size of the candidate block



51
52
53
54
55
56
# File 'lib/ollama_chat/compaction.rb', line 51

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

#candidates ⇒ Integer (readonly)

Returns number of messages that were summarized.

Returns:

  • (Integer) —

    number of messages that were summarized



51
52
53
54
55
56
# File 'lib/ollama_chat/compaction.rb', line 51

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

#context_after ⇒ String (readonly)

Returns formatted context usage after compaction.

Returns:

  • (String) —

    formatted context usage after compaction



51
52
53
54
55
56
# File 'lib/ollama_chat/compaction.rb', line 51

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

#context_before ⇒ String (readonly)

Returns formatted context usage before compaction.

Returns:

  • (String) —

    formatted context usage before compaction



51
52
53
54
55
56
# File 'lib/ollama_chat/compaction.rb', line 51

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

#context_filled_after ⇒ Float (readonly)

Returns fraction of the context window filled after compaction.

Returns:

  • (Float) —

    fraction of the context window filled after compaction



51
52
53
54
55
56
# File 'lib/ollama_chat/compaction.rb', line 51

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

#context_filled_before ⇒ Float (readonly)

Returns fraction of the context window filled before compaction (e. g. 0.382 for 38.2%).

Returns:

  • (Float) —

    fraction of the context window filled before compaction (e. g. 0.382 for 38.2%)



51
52
53
54
55
56
# File 'lib/ollama_chat/compaction.rb', line 51

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

#stored_total ⇒ String (readonly)

Returns formatted full conversation length.

Returns:

  • (String) —

    formatted full conversation length



51
52
53
54
55
56
# File 'lib/ollama_chat/compaction.rb', line 51

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

#summary_size ⇒ String (readonly)

Returns formatted size of the generated summary.

Returns:

  • (String) —

    formatted size of the generated summary



51
52
53
54
55
56
# File 'lib/ollama_chat/compaction.rb', line 51

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