Explorar o código

Update max allowed size

Saoud Rizwan hai 1 ano
pai
achega
172aaa524b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/ClaudeDev.ts

+ 1 - 1
src/ClaudeDev.ts

@@ -1318,7 +1318,7 @@ ${this.customInstructions.trim()}
 				)
 				const totalTokens = (tokensIn || 0) + (tokensOut || 0) + (cacheWrites || 0) + (cacheReads || 0)
 				const contextWindow = this.api.getModel().info.contextWindow
-				const maxAllowedSize = Math.max(contextWindow - 20_000, contextWindow * 0.8)
+				const maxAllowedSize = Math.max(contextWindow - 40_000, contextWindow * 0.8)
 				if (totalTokens >= maxAllowedSize) {
 					const truncatedMessages = truncateHalfConversation(this.apiConversationHistory)
 					await this.overwriteApiConversationHistory(truncatedMessages)