From 4ad659bb766e2015dc72064a9077fab9a2c70074 Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Tue, 2 May 2023 19:58:52 +0900 Subject: [PATCH] better? message selection for last-in-context --- public/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index 5c41080f9..52abed152 100644 --- a/public/script.js +++ b/public/script.js @@ -1731,7 +1731,7 @@ async function Generate(type, automatic_trigger, force_name2) { $("#chat").children().removeClass('lastInContext'); console.log(arrMes.length); - $(`#chat .mes:nth-last-of-type(${arrMes.length + 1})`).addClass('lastInContext'); + $(`#chat .mes:nth-last-child(${arrMes.length})`).addClass('lastInContext'); break; } @@ -1937,7 +1937,7 @@ async function Generate(type, automatic_trigger, force_name2) { if (power_user.collapse_newlines) { finalPromt = collapseNewlines(finalPromt); } - + //console.log(`---Calculated Prompt Tokens: ${getTokenCount(finalPromt, padding_tokens)}`); let this_amount_gen = parseInt(amount_gen); // how many tokens the AI will be requested to generate let this_settings = koboldai_settings[koboldai_setting_names[preset_settings]];