ContextWindow class

Represents the token capacity of a model's context window.

Constructors

ContextWindow({required int maxInput, required int maxOutput, int used = 0})
const

Properties

available → int
Tokens still available in the input context.
no setter
hashCode → int
The hash code for this object.
no setterinherited
maxInput → int
final
maxOutput → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
used → int
final
utilizationPercent → double
Utilization as a percentage (0.0 to 100.0).
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
withUsed(int used) → ContextWindow
Returns a copy with updated used count.

Operators

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