Class: OllamaChat::Compaction::Result
- Inherits:
-
Data
- Object
- Data
- OllamaChat::Compaction::Result
- Defined in:
- lib/ollama_chat/compaction.rb
Overview
Value object carrying the outcome of a successful compact! call.
Instance Attribute Summary collapse
-
#candidate_size ⇒ String
readonly
Formatted size of the candidate block.
-
#candidates ⇒ Integer
readonly
Number of messages that were summarized.
-
#context_after ⇒ String
readonly
Formatted context usage after compaction.
-
#context_before ⇒ String
readonly
Formatted context usage before compaction.
-
#context_filled_after ⇒ Float
readonly
Fraction of the context window filled after compaction.
-
#context_filled_before ⇒ Float
readonly
Fraction of the context window filled before compaction (e. g.
0.382for 38.2%). -
#stored_total ⇒ String
readonly
Formatted full conversation length.
-
#summary_size ⇒ String
readonly
Formatted size of the generated summary.
Instance Attribute Details
#candidate_size ⇒ String (readonly)
Returns 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.
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.
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.
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.
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%).
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.
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.
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 ) |