Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference {% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %} # SlidingWindow 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. > Configures the sliding window context compression mechanism. The sliding window discards content at the beginning of the context window. The resulting context will always begin at the start of a `user` role turn. System instructions will always remain at the start of the result. Signature: ```typescript export interface SlidingWindow ``` ## Properties | Property | Type | Description | | --- | --- | --- | | [targetTokens](./ai.slidingwindow.md#slidingwindowtargettokens) | number | (Public Preview) The session reduction target, for example, how many tokens the model should keep. | ## SlidingWindow.targetTokens > 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 session reduction target, for example, how many tokens the model should keep. Signature: ```typescript targetTokens?: number; ```