From f043fe6b60693339a8270f148a7cb98f252ea592 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 23 Aug 2024 10:26:53 -0300 Subject: [PATCH] Feature renamed to Max Recursion Steps --- public/index.html | 6 +++--- public/scripts/world-info.js | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/public/index.html b/public/index.html index 9520ef8b5..1f8fd6bf2 100644 --- a/public/index.html +++ b/public/index.html @@ -3637,11 +3637,11 @@
- Max Recursion Depth + Max Recursion Steps
- - + +
diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index b6688458f..f2f47335e 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -73,7 +73,7 @@ export let world_info_match_whole_words = false; export let world_info_use_group_scoring = false; export let world_info_character_strategy = world_info_insertion_strategy.character_first; export let world_info_budget_cap = 0; -export let world_info_max_recursion_depth = 0; +export let world_info_max_recursion_steps = 0; const saveWorldDebounced = debounce(async (name, data) => await _save(name, data), debounce_timeout.relaxed); const saveSettingsDebounced = debounce(() => { Object.assign(world_info, { globalSelect: selected_world_info }); @@ -711,7 +711,7 @@ export function getWorldInfoSettings() { world_info_character_strategy, world_info_budget_cap, world_info_use_group_scoring, - world_info_max_recursion_depth, + world_info_max_recursion_steps, }; } @@ -798,8 +798,8 @@ export function setWorldInfoSettings(settings, data) { world_info_budget_cap = Number(settings.world_info_budget_cap); if (settings.world_info_use_group_scoring !== undefined) world_info_use_group_scoring = Boolean(settings.world_info_use_group_scoring); - if (settings.world_info_max_recursion_depth !== undefined) - world_info_max_recursion_depth = Number(settings.world_info_max_recursion_depth); + if (settings.world_info_max_recursion_steps !== undefined) + world_info_max_recursion_steps = Number(settings.world_info_max_recursion_steps); // Migrate old settings if (world_info_budget > 100) { @@ -848,8 +848,8 @@ export function setWorldInfoSettings(settings, data) { $('#world_info_budget_cap').val(world_info_budget_cap); $('#world_info_budget_cap_counter').val(world_info_budget_cap); - $('#world_info_max_recursion_depth').val(world_info_max_recursion_depth); - $('#world_info_max_recursion_depth_counter').val(world_info_max_recursion_depth); + $('#world_info_max_recursion_steps').val(world_info_max_recursion_steps); + $('#world_info_max_recursion_steps_counter').val(world_info_max_recursion_steps); world_names = data.world_names?.length ? data.world_names : []; @@ -3730,8 +3730,8 @@ export async function checkWorldInfo(chat, maxContext, isDryRun) { console.debug(`[WI] --- SEARCHING ENTRIES (on ${sortedEntries.length} entries) ---`); while (scanState) { - //if world_info_max_recursion_depth is non-zero min activations are disabled, and vice versa - if (world_info_max_recursion_depth && world_info_max_recursion_depth <= count) { + //if world_info_max_recursion_steps is non-zero min activations are disabled, and vice versa + if (world_info_max_recursion_steps && world_info_max_recursion_steps <= count) { break; } @@ -4777,7 +4777,7 @@ jQuery(() => { $('#world_info_min_activations_counter').val(world_info_min_activations); if (world_info_min_activations !== 0) { - $('#world_info_max_recursion_depth').val(0).trigger("input"); + $('#world_info_max_recursion_steps').val(0).trigger("input"); } else { saveSettings(); } @@ -4836,10 +4836,10 @@ jQuery(() => { saveSettings(); }); - $('#world_info_max_recursion_depth').on('input', function () { - world_info_max_recursion_depth = Number($(this).val()); - $('#world_info_max_recursion_depth_counter').val(world_info_max_recursion_depth); - if (world_info_max_recursion_depth !== 0) { + $('#world_info_max_recursion_steps').on('input', function () { + world_info_max_recursion_steps = Number($(this).val()); + $('#world_info_max_recursion_steps_counter').val(world_info_max_recursion_steps); + if (world_info_max_recursion_steps !== 0) { $('#world_info_min_activations').val(0).trigger("input"); } else { saveSettings();