mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Prevent chat history warnings from showing too early
This commit is contained in:
@ -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;
|
||||||
|
Reference in New Issue
Block a user