CompactionSettings class final

Compaction thresholds and retention settings.

Ported from pi's CompactionSettings.

Constructors

CompactionSettings({required bool enabled, required int reserveTokens, required int keepRecentTokens})
Creates a CompactionSettings.
const
CompactionSettings.forWindow(int window)
Creates settings scaled to a model's context window (in tokens).
factory

Properties

enabled → bool
Enable automatic compaction decisions.
final
hashCode → int
The hash code for this object.
no setterinherited
keepRecentTokens → int
Approximate recent-context tokens to keep after compaction.
final
reserveTokens → int
Tokens reserved for the summary prompt and output.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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