mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-22 11:16:08 +00:00
impersonate user bug
This commit is contained in:
parent
13d1405104
commit
dd558d8458
1 changed files with 9 additions and 7 deletions
16
klite.embd
16
klite.embd
|
|
@ -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.";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue