mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix
This commit is contained in:
@@ -620,6 +620,7 @@
|
||||
|
||||
|
||||
}
|
||||
|
||||
var chat2 = [];
|
||||
var j = 0;
|
||||
for(var i = chat.length-1; i >= 0; i--){
|
||||
@@ -663,11 +664,11 @@
|
||||
}
|
||||
await delay(1); //For disable slow down (encode gpt-2 need fix)
|
||||
//console.log(i+' '+chat.length);
|
||||
|
||||
if(i == chat.length-1){
|
||||
if(mesExamplesArray.length > 0){
|
||||
|
||||
}
|
||||
|
||||
for(let iii = 0; iii < mesExamplesArray.length; iii++){//mesExamplesArray
|
||||
|
||||
if(encode(JSON.stringify(storyString+chatString+anchorTop+anchorBottom+charPersonality)).length+120 < this_max_context){ //example of dialogs
|
||||
if(!is_pygmalion){
|
||||
mesExamplesArray[iii] = mesExamplesArray[iii].replace(/<START>/i, 'This is how '+name2+' should talk');//An example of how '+name2+' responds
|
||||
@@ -677,10 +678,12 @@
|
||||
|
||||
//arrMes[arrMes.length] = item;
|
||||
}else{
|
||||
return;
|
||||
|
||||
iii = mesExamplesArray.length;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!is_pygmalion){
|
||||
if(Scenario !== undefined){
|
||||
if(Scenario.length > 0){
|
||||
@@ -697,6 +700,7 @@
|
||||
}
|
||||
|
||||
function runGenerate(cycleGenerationPromt = ''){
|
||||
|
||||
if(cycleGenerationPromt === ''){
|
||||
|
||||
chatString = "";
|
||||
@@ -857,11 +861,6 @@
|
||||
message_already_generated +=getMessage;
|
||||
if(message_already_generated.indexOf('You:') === -1 && tokens_already_generated < parseInt(amount_gen)){
|
||||
|
||||
if(tokens_already_generated === 0){
|
||||
getMessage = getMessage.trimStart();
|
||||
getMessage = ' '+getMessage;
|
||||
}
|
||||
|
||||
runGenerate(storyString+getMessage);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user