Fix character name appending on user continue
This commit is contained in:
parent
cf853a21ad
commit
ac4b673c5a
|
@ -3294,12 +3294,14 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||
}
|
||||
|
||||
// Add character's name
|
||||
// Force name append on continue
|
||||
// Force name append on continue (if not continuing on user message)
|
||||
if (!isInstruct && force_name2) {
|
||||
if (!lastMesString.endsWith('\n')) {
|
||||
lastMesString += '\n';
|
||||
}
|
||||
lastMesString += `${name2}:`;
|
||||
if (!isContinue || !(chat[chat.length - 1]?.is_user)) {
|
||||
lastMesString += `${name2}:`;
|
||||
}
|
||||
}
|
||||
|
||||
return lastMesString;
|
||||
|
|
Loading…
Reference in New Issue