partially fix quietPrompts (/sysgen) for Instruct

This commit is contained in:
RossAscends 2023-09-16 12:48:14 +09:00
parent 1fed8ba4f7
commit e162df67fa
1 changed files with 15 additions and 5 deletions

View File

@ -2755,7 +2755,17 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
if (quiet_prompt && quiet_prompt.length) {
const name = name1;
const quietAppend = isInstruct ? formatInstructModeChat(name, quiet_prompt, false, true, '', name1, name2, false) : `\n${quiet_prompt}`;
//This begins to fix quietPrompts (particularly /sysgen) for instruct
//previously instruct input sequence was being appended to the last chat message w/o '\n'
//and no output sequence was added after the input's content.
//TODO: respect output_sequence vs last_output_sequence settings
//TODO: decide how to prompt this to clarify who is talking 'Narrator', 'System', etc.
if (isInstruct) {
lastMesString += '\n' + quietAppend + power_user.instruct.output_sequence + '\n';
} else {
lastMesString += quietAppend;
}
// Bail out early
return lastMesString;
}