org.llm4s.llmconnect.config.ContextWindowResolver
See theContextWindowResolver companion object
Resolves context window and output-reserve token counts for a given model using the model registry.
Attributes
-
Companion
-
object
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
Members list
Looks up context-window size and output-token reserve for a model, falling back to provided defaults.
Looks up context-window size and output-token reserve for a model, falling back to provided defaults.
Value parameters
-
defaultContextWindow
-
fallback maximum context-window size in tokens
-
defaultReserve
-
fallback maximum output-token reserve
-
fallbackResolver
-
function returning (contextWindow, reserve) when the registry has no entry
-
logPrefix
-
optional string prepended to log messages for disambiguation
-
lookupProviders
-
ordered list of provider names to try when querying the registry
-
modelName
-
name of the model whose limits should be resolved
Attributes
-
Returns
-
pair of (contextWindow, reserveTokens) for the resolved model