Token Count Error

This commit is contained in:
ebolam
2022-08-24 14:00:02 -04:00
parent aa2dc61ad0
commit 851bddd07c
2 changed files with 2 additions and 5 deletions

View File

@@ -240,6 +240,7 @@ class koboldai_vars(object):
used_tokens+=wi['token_length']
used_world_info.append(wi['uid'])
text += wi['content']
self.worldinfo_v2.set_world_info_used(wi['uid'])
self.prompt_in_ai = True
else:
self.prompt_in_ai = False
@@ -508,7 +509,7 @@ class story_settings(settings):
self.story_id = int.from_bytes(os.urandom(16), 'little', signed=True) # this is a unique ID for the story. We'll use this to ensure when we save that we're saving the same story
self.memory_length = 0
self.prompt_length = 0
self.authornote_length = 512
self.authornote_length = 0
self.max_memory_length = 512
self.max_prompt_length = 512
self.max_authornote_length = 512

View File

@@ -1303,8 +1303,6 @@ function world_info_entry(data) {
wpp_format.onchange = function () {
do_wpp(this.parentElement);
}
console.log(data.wpp['format']);
console.log(data.wpp);
if (data.wpp.format == "W++") {
wpp_format.selectedIndex = 0;
} else {
@@ -1844,7 +1842,6 @@ function calc_token_usage() {
}
function Change_Theme(theme) {
console.log(theme);
var css = document.getElementById("CSSTheme");
css.setAttribute("href", "/themes/"+theme+".css");
setTimeout(() => {
@@ -1855,7 +1852,6 @@ function Change_Theme(theme) {
for (element of select.childNodes) {
if (element.value == theme) {
element.selected = true;
console.log(element);
} else {
element.selected = false;
}