Remove extraneous newlines when formatting quiet prompts
This commit is contained in:
parent
9987ec33d9
commit
e99d37d549
|
@ -3555,7 +3555,7 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu
|
|||
//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';
|
||||
lastMesString += quietAppend; // + power_user.instruct.output_sequence + '\n';
|
||||
} else {
|
||||
lastMesString += quietAppend;
|
||||
}
|
||||
|
|
|
@ -458,6 +458,11 @@ export function formatInstructModePrompt(name, isImpersonate, promptBias, name1,
|
|||
const separator = power_user.instruct.wrap ? '\n' : '';
|
||||
let text = includeNames ? (separator + sequence + separator + `${name}:`) : (separator + sequence);
|
||||
|
||||
// Quiet prompt already has a newline at the end
|
||||
if (isQuiet && separator) {
|
||||
text = text.slice(separator.length);
|
||||
}
|
||||
|
||||
if (!isImpersonate && promptBias) {
|
||||
text += (includeNames ? promptBias : (separator + promptBias.trimStart()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue