1.9 KiB
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 %}
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;