Skip to content

TruncateConfig

Defined in: src/context-manager/methods/truncate.ts:19

Experimental

Configuration for the truncate method.

previewTokens?: number;

Defined in: src/context-manager/methods/truncate.ts:25

Experimental

Number of tokens to keep as preview text. Defaults to 1,000. Content that already fits is left unchanged. For Offload.truncate('*'), the budget of whole messages kept at the head and tail; the rest are replaced by one [... earlier messages elided, ~N tokens ...] marker.


preview?: "head" | "tail" | "headTail";

Defined in: src/context-manager/methods/truncate.ts:30

Experimental

Which portion of the text to keep as preview. Defaults to ‘headTail’. For Offload.truncate('*'), 'head' keeps only the oldest messages and 'tail' only the newest.