Package com.google.genai.types
Class ContextWindowCompressionConfig
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ContextWindowCompressionConfig
Enables context window compression -- mechanism managing model context window so it does not
exceed given length.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for ContextWindowCompressionConfig. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Instantiates a builder for ContextWindowCompressionConfig.Deserializes a JSON string to a ContextWindowCompressionConfig object.abstract Optional<SlidingWindow>Sliding window compression mechanism.Creates a builder with the same values as this instance.Number of tokens (before running turn) that triggers context window compression mechanism.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
ContextWindowCompressionConfig
public ContextWindowCompressionConfig()
-
-
Method Details
-
triggerTokens
Number of tokens (before running turn) that triggers context window compression mechanism. -
slidingWindow
Sliding window compression mechanism. -
builder
Instantiates a builder for ContextWindowCompressionConfig. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a ContextWindowCompressionConfig object.
-