ContextWindowCompressionConfig interface

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Enables context window compression to manage the model's context window.

This mechanism prevents the context from exceeding a given length.

Signature:

export interface ContextWindowCompressionConfig 

Properties

Property Type Description
slidingWindow SlidingWindow (Public Preview) The sliding window compression mechanism.
triggerTokens number (Public Preview) The number of tokens (before running a turn) that triggers the context window compression.

ContextWindowCompressionConfig.slidingWindow

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The sliding window compression mechanism.

Signature:

slidingWindow?: SlidingWindow;

ContextWindowCompressionConfig.triggerTokens

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The number of tokens (before running a turn) that triggers the context window compression.

Signature:

triggerTokens?: number;