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