mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Impersonate for Kobold, ooba, Novel
This commit is contained in:
@ -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';
|
||||
|
Reference in New Issue
Block a user