Fix group wrapper not resolving to a valid text

This commit is contained in:
Cohee
2023-12-11 19:00:42 +02:00
parent 0fcf8fd491
commit e96fb0c1b5
2 changed files with 9 additions and 2 deletions

View File

@ -1781,6 +1781,12 @@ async function generateMultimodalPrompt(generationType, quietPrompt) {
*/
async function generatePrompt(quietPrompt) {
const reply = await generateQuietPrompt(quietPrompt, false, false);
if (!reply) {
toastr.error('Prompt generation produced no text. Make sure you\'re using a valid instruct template and try again', 'Image Generation');
throw new Error('Prompt generation failed.');
}
return processReply(reply);
}