From a53e99b831c3ca502cda336840e1139592f6ba73 Mon Sep 17 00:00:00 2001 From: maver Date: Mon, 3 Jul 2023 19:32:43 +0200 Subject: [PATCH] Prevent chat history warnings from showing too early --- public/scripts/PromptManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js index a8e453666..f8412876b 100644 --- a/public/scripts/PromptManager.js +++ b/public/scripts/PromptManager.js @@ -941,7 +941,7 @@ PromptManagerModule.prototype.renderPromptManagerListItems = function () { let warningTitle = ''; const tokenBudget = this.serviceSettings.openai_max_context - this.serviceSettings.openai_max_tokens; - if ( + if ( this.tokenUsage > tokenBudget * 0.8 && 'chatHistory' === prompt.identifier) { const warningThreshold = this.configuration.warningTokenThreshold; const dangerThreshold = this.configuration.dangerTokenThreshold;