update per cohee recommendations

This commit is contained in:
Kendell R
2025-04-20 14:20:13 -07:00
committed by GitHub
parent c63ef20919
commit dd3d3226eb

View File

@ -1412,8 +1412,8 @@ export async function prepareOpenAIMessages({
await populateChatCompletion(prompts, chatCompletion, { bias, quietPrompt, quietImage, type, cyclePrompt, messages, messageExamples });
} catch (error) {
if (error instanceof TokenBudgetExceededError) {
toastr.error(t`Context size exceeded.`);
chatCompletion.log('Context size exceeded.');
toastr.error(t`Mandatory prompts exceed the context size.`);
chatCompletion.log('Mandatory prompts exceed the context size.');
promptManager.error = t`Not enough free tokens for mandatory prompts. Raise your token limit or disable custom prompts.`;
} else if (error instanceof InvalidCharacterNameError) {
toastr.warning(t`An error occurred while counting tokens: Invalid character name`);