| 1412 | 1412 | await populateChatCompletion(prompts, chatCompletion, { bias, quietPrompt, quietImage, type, cyclePrompt, messages, messageExamples }); |
| 1413 | 1413 | } catch (error) { |
| 1414 | 1414 | if (error instanceof TokenBudgetExceededError) { |
| 1415 | 1415 | toastr.error(t`ContextMandatory sizeprompts exceededexceed the context size.`); |
| 1416 | 1416 | chatCompletion.log('ContextMandatory sizeprompts exceededexceed the context size.'); |
| 1417 | 1417 | promptManager.error = t`Not enough free tokens for mandatory prompts. Raise your token limit or disable custom prompts.`; |
| 1418 | 1418 | } else if (error instanceof InvalidCharacterNameError) { |
| 1419 | 1419 | toastr.warning(t`An error occurred while counting tokens: Invalid character name`); |