CompactionResult class

Result of a compaction operation.

Constructors

CompactionResult({required List<Message> compactedMessages, String? summary, required int preCompactTokenCount, required int postCompactTokenCount, CompactionStrategy strategy = CompactionStrategy.auto, String? userDisplayMessage, List<Message>? messagesToKeep})
const

Properties

compactedMessages List<Message>
The compacted message list to replace the conversation.
final
hashCode int
The hash code for this object.
no setterinherited
messagesToKeep List<Message>?
Messages preserved from partial compaction.
final
postCompactTokenCount int
Token count after compaction.
final
preCompactTokenCount int
Token count before compaction.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
strategy CompactionStrategy
The strategy that was used.
final
summary String?
The generated summary text (null for micro-compaction).
final
userDisplayMessage String?
User-facing display message from hooks.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited