mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add elvis to getTokens when populating legacy context.
This commit is contained in:
@ -1194,7 +1194,7 @@ PromptManagerModule.prototype.populateTokenCounts = function (messages) {
|
|||||||
PromptManagerModule.prototype.populateLegacyTokenCounts = function (messages) {
|
PromptManagerModule.prototype.populateLegacyTokenCounts = function (messages) {
|
||||||
// Update general token counts
|
// Update general token counts
|
||||||
const chatHistory = messages.getItemByIdentifier('chatHistory');
|
const chatHistory = messages.getItemByIdentifier('chatHistory');
|
||||||
const startChat = chatHistory?.getCollection()[0].getTokens() || 0;
|
const startChat = chatHistory?.getCollection()[0]?.getTokens() || 0;
|
||||||
const continueNudge = chatHistory?.getCollection().find(message => message.identifier === 'continueNudge')?.getTokens() || 0;
|
const continueNudge = chatHistory?.getCollection().find(message => message.identifier === 'continueNudge')?.getTokens() || 0;
|
||||||
|
|
||||||
this.tokenHandler.counts = {
|
this.tokenHandler.counts = {
|
||||||
|
Reference in New Issue
Block a user