SlidingWindow class
Sliding window configuration for context compression.
Specifies how much context to retain when compression is triggered.
Constructors
- SlidingWindow({int? targetTokens})
-
Creates a SlidingWindow.
const
-
SlidingWindow.fromJson(Map<
String, dynamic> json) -
Creates from JSON.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- targetTokens → int?
-
Target number of tokens to retain after compression.
final
Methods
-
copyWith(
{int? targetTokens}) → SlidingWindow - Creates a copy with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited