Companion
Provides companion object-related strategies for determining the context window length. It contains multiple strategies that are implemented as subtypes of ContextWindowStrategy.
Types
Link copied to clipboard
data class FitPrompt(val promptTokenizer: PromptTokenizer? = null, val contextChunkSize: Long = 2048, val minimumChunkCount: Long? = null, val maximumChunkCount: Long? = null) : ContextWindowStrategy
A strategy for computing the context window length based on the prompt length.
Link copied to clipboard
A strategy for specifying a fixed context window length. If the given contextLength is more than the maximum context window length supported by the model, the context window length will be set to the maximum context window length supported by the model.
Link copied to clipboard
A strategy for letting the Ollama server decide the context window length. To decide the context window length, Ollama proceeds as follows: