Skip to content

rulvar API reference


rulvar API reference / @rulvar/core / atCompactionThreshold

Function: atCompactionThreshold()

ts
function atCompactionThreshold(
   usedTokens, 
   contextWindow, 
   threshold): boolean;

Defined in: packages/core/src/model/roles.ts:108

The summarize trigger: the compaction threshold on the context window (default 0.8). Pure predicate; the compaction pipeline that acts on it is M4-T03.

Parameters

ParameterType
usedTokensnumber
contextWindownumber
thresholdnumber

Returns

boolean