getAutoCompactThreshold function
Calculate the auto-compact threshold.
Implementation
int getAutoCompactThreshold(String model, int contextWindow) {
final effectiveContextWindow = getEffectiveContextWindowSize(
model,
contextWindow,
);
return effectiveContextWindow - autocompactBufferTokens;
}