mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
CC: Actually check if can afford both the block and the header
This commit is contained in:
@ -811,8 +811,7 @@ async function populateDialogueExamples(prompts, chatCompletion, messageExamples
|
|||||||
chatMessages.push(chatMessage);
|
chatMessages.push(chatMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
const canAffordBlock = chatCompletion.canAfford(newExampleChat) && chatCompletion.canAffordAll(chatMessages);
|
if (!chatCompletion.canAffordAll([newExampleChat, ...chatMessages])) {
|
||||||
if (!canAffordBlock) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user