stylistic update

This commit is contained in:
Dallin Romney 2025-04-23 15:52:45 -07:00
parent 5826ceeff4
commit 16a3aa385f

View file

@ -379,9 +379,14 @@ function compileChatMessages({
const countingSafetyBuffer = getTokenCountingBufferSafety(contextLength);
const minOutputTokens = getMinResponseTokens(maxTokens);
let inputTokensAvailable =
contextLength - countingSafetyBuffer - minOutputTokens;
let inputTokensAvailable = contextLength;
// Leave space for output/safety
inputTokensAvailable -= countingSafetyBuffer;
inputTokensAvailable -= minOutputTokens;
// Non-negotiable messages
inputTokensAvailable -= toolTokens;
inputTokensAvailable -= systemMsgTokens;
inputTokensAvailable -= lastMessagesTokens;