ContextWindowCompressionConfig
@available(watchOS, unavailable)
public struct ContextWindowCompressionConfig : SendableEnables context window compression to manage the model's context window.
This mechanism prevents the context from exceeding a given length.
-
Creates a new
ContextWindowCompressionConfigvalue.Declaration
Swift
public init(triggerTokens: Int? = nil, slidingWindow: SlidingWindow? = nil)Parameters
triggerTokensThe number of tokens that triggers the compression mechanism.
slidingWindowThe sliding window compression mechanism to use.