Add elvis to getTokens when populating legacy context.
This commit is contained in:
parent
7676409197
commit
ea72584f39
|
@ -1194,7 +1194,7 @@ PromptManagerModule.prototype.populateTokenCounts = function (messages) {
|
|||
PromptManagerModule.prototype.populateLegacyTokenCounts = function (messages) {
|
||||
// Update general token counts
|
||||
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;
|
||||
|
||||
this.tokenHandler.counts = {
|
||||
|
|
Loading…
Reference in New Issue