Prevent chat history warnings from showing too early
This commit is contained in:
parent
abe986ec4b
commit
a53e99b831
|
@ -941,7 +941,7 @@ PromptManagerModule.prototype.renderPromptManagerListItems = function () {
|
||||||
let warningTitle = '';
|
let warningTitle = '';
|
||||||
|
|
||||||
const tokenBudget = this.serviceSettings.openai_max_context - this.serviceSettings.openai_max_tokens;
|
const tokenBudget = this.serviceSettings.openai_max_context - this.serviceSettings.openai_max_tokens;
|
||||||
if (
|
if ( this.tokenUsage > tokenBudget * 0.8 &&
|
||||||
'chatHistory' === prompt.identifier) {
|
'chatHistory' === prompt.identifier) {
|
||||||
const warningThreshold = this.configuration.warningTokenThreshold;
|
const warningThreshold = this.configuration.warningTokenThreshold;
|
||||||
const dangerThreshold = this.configuration.dangerTokenThreshold;
|
const dangerThreshold = this.configuration.dangerTokenThreshold;
|
||||||
|
|
Loading…
Reference in New Issue