diff --git a/gensettings.py b/gensettings.py index 2e7a2a05..13d115e0 100644 --- a/gensettings.py +++ b/gensettings.py @@ -881,6 +881,23 @@ gensettingstf = [ "ui_level": 0 }, { + "UI_V2_Only": True, + "uitype": "slider", + "unit": "int", + "label": "WI Gen Amount", + "id": "wigen_amount", + "min": 25, + "max": 125, + "step": 1, + "default": 80, + "tooltip": "How many tokens the World Info Generator creates.", + "menu_path": "World Info", + "sub_path": "", + "classname": "user", + "name": "wigen_amount", + "ui_level": 2 + }, + { "UI_V2_Only": True, "uitype": "toggle", "unit": "bool", diff --git a/koboldai_settings.py b/koboldai_settings.py index 5c1f1ede..ab78f434 100644 --- a/koboldai_settings.py +++ b/koboldai_settings.py @@ -1153,6 +1153,7 @@ class user_settings(settings): self.img_gen_cfg_scale = 7.0 self.cluster_requested_models = [] # The models which we allow to generate during cluster mode self.wigen_use_own_wi = False + self.wigen_amount = 80 def __setattr__(self, name, value): diff --git a/static/koboldai.js b/static/koboldai.js index 9d4726da..e8f4573c 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -2265,9 +2265,11 @@ function world_info_entry(data) { } // TODO: Make type input element - generateWIData(data.uid, "desc", title.innerText, type, null, 80); + let genAmount = parseInt($el("#user_wigen_amount").value); + generateWIData(data.uid, "desc", title.innerText, type, null, genAmount); this.innerText = "autorenew"; this.classList.add("spinner"); + manual_text.classList.add("disabled"); }); genTypeInput.addEventListener("focus", function() { @@ -6954,6 +6956,8 @@ function showGeneratedWIData(data) { generating_summary = false; console.warn(data) const card = $el(`.world_info_card[uid="${data.uid}"]`); + const manualTextEl = card.querySelector(".world_info_entry_text"); + manualTextEl.classList.remove("disabled"); // Stop spinning! for (const littleRobotFriend of card.querySelectorAll(".generate-button.spinner")) {