Apply character specific prompt overrides

Jailbreak and main
This commit is contained in:
maver
2023-06-18 20:12:21 +02:00
parent 5afd60c578
commit 2c36fbdc1d
3 changed files with 44 additions and 3 deletions

View File

@ -575,6 +575,7 @@ async function prepareOpenAIMessages({
try {
populateChatCompletion(prompts, chatCompletion, {bias, quietPrompt, type});
} catch (error) {
toastr.error('An error occurred while counting tokens.')
if (error instanceof TokenBudgetExceededError) {
chatCompletion.log('Token budget exceeded.');
promptManager.error = 'Not enough free tokens for mandatory prompts. Raise your token Limit or disable custom prompts.';