mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-22 06:57:41 +01:00
Simplify token threshold warnings
This commit is contained in:
parent
49cb682499
commit
2054cbeb83
@ -767,11 +767,10 @@ 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;
|
||||||
const tokenThreshold = tokenBudget * 0.9;
|
if (
|
||||||
if (this.tokenCache >= tokenThreshold &&
|
|
||||||
'chatHistory' === prompt.identifier) {
|
'chatHistory' === prompt.identifier) {
|
||||||
const warningThreshold = tokenBudget * 0.50;
|
const warningThreshold = tokenBudget * 0.60;
|
||||||
const dangerThreshold = tokenBudget * 0.30;
|
const dangerThreshold = tokenBudget * 0.35;
|
||||||
|
|
||||||
if (tokens <= dangerThreshold) {
|
if (tokens <= dangerThreshold) {
|
||||||
warningClass = 'fa-solid tooltip fa-triangle-exclamation text_danger';
|
warningClass = 'fa-solid tooltip fa-triangle-exclamation text_danger';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user