This commit is contained in:
Ahmed Ibrahim
2025-10-24 10:08:47 -07:00
parent 79c628a823
commit 6ffbd0d4e3
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ impl ConversationHistory {
}
}
let prior_total = info.total_token_usage.total_tokens;
let prior_total = info.last_token_usage.total_tokens;
let combined_tokens = prior_total.saturating_add(input_tokens);
let threshold = context_window * 95 / 100;
if combined_tokens > threshold {