mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-19 01:05:09 +02:00
impersonate user bug
This commit is contained in:
+9
-7
@@ -10236,12 +10236,7 @@ Current version: 141
|
||||
|
||||
//randomize opponent if there is more than one
|
||||
let hasMulti = false;
|
||||
if(is_impersonate_user)
|
||||
{
|
||||
is_impersonate_user = false;
|
||||
co = localsettings.chatname;
|
||||
}
|
||||
else if(co.includes("||$||"))
|
||||
if(!is_impersonate_user && co.includes("||$||"))
|
||||
{
|
||||
let coarr = co.split("||$||");
|
||||
coarr = coarr.filter(x=>(x&&x!=""));
|
||||
@@ -10283,9 +10278,16 @@ Current version: 141
|
||||
if(trimmed!=""){ co = trimmed; }
|
||||
}
|
||||
|
||||
let original_co = co;
|
||||
if(is_impersonate_user) //replace opponent with ourselves if needed
|
||||
{
|
||||
is_impersonate_user = false;
|
||||
co = localsettings.chatname;
|
||||
}
|
||||
|
||||
if (localsettings.chat_context_mod && current_anote.length == 0 && current_memory.length == 0 && current_wi.length == 0) {
|
||||
if (gametext_arr.length > 0 && gametext_arr[0].startsWith("\n" + me + ": ")) {
|
||||
let injected = "[The following is an interesting chat message log between " + me + " and " + co + ".]\n\n" + localsettings.chatname + ": Hi.\n" + co + ": Hello.";
|
||||
let injected = "[The following is an interesting chat message log between " + me + " and " + original_co + ".]\n\n" + localsettings.chatname + ": Hi.\n" + original_co + ": Hello.";
|
||||
if(co=="")
|
||||
{
|
||||
injected = "[The following is an interesting chat message log between " + me + " and someone else.]\n\n" + localsettings.chatname + ": Hi.";
|
||||
|
||||
Reference in New Issue
Block a user