Skip to content

Commit 8ec903d

Browse files
committed
Fix typo
1 parent 8a189af commit 8ec903d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/sliding-window/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ export function truncateConversationIfNeeded(
4949
*/
5050
function getMaxTokens(modelInfo: ModelInfo): number {
5151
// The buffer needs to be at least as large as `modelInfo.maxTokens`, or 20% of the context window if for some reason it's not set.
52-
return modelInfo.contextWindow - Math.max(modelInfo.maxTokens || modelInfo.contextWindow * 0.2)
52+
return modelInfo.contextWindow - (modelInfo.maxTokens || modelInfo.contextWindow * 0.2)
5353
}

0 commit comments

Comments
 (0)