Impersonate for Kobold, ooba, Novel

This commit is contained in:
SillyLossy
2023-04-15 01:05:29 +03:00
parent 449fe0b0f0
commit dd50f98123

View File

@ -1489,6 +1489,10 @@ async function Generate(type, automatic_trigger, force_name2) {
force_name2 = true;
}
if (isImpersonate) {
force_name2 = false;
}
//////////////////////////////////
var count_exm_add = 0;
@ -1721,6 +1725,14 @@ async function Generate(type, automatic_trigger, force_name2) {
for (let j = 0; j < mesSend.length; j++) {
mesSendString += mesSend[j];
if (isImpersonate && j === mesSend.length -1 && tokens_already_generated === 0) {
const name = is_pygmalion ? 'You' : name1;
if (!mesSendString.endsWith('\n')) {
mesSendString += '\n';
}
mesSendString += name + ':';
}
if (force_name2 && j === mesSend.length - 1 && tokens_already_generated === 0) {
if (!mesSendString.endsWith('\n')) {
mesSendString += '\n';