mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Forgot script js
This commit is contained in:
196
public/script.js
196
public/script.js
@@ -46,6 +46,13 @@ import {
|
|||||||
disable_scenario_formatting,
|
disable_scenario_formatting,
|
||||||
} from "./scripts/power-user.js";
|
} from "./scripts/power-user.js";
|
||||||
|
|
||||||
|
import {
|
||||||
|
getNovelTier,
|
||||||
|
loadNovelPreset,
|
||||||
|
loadNovelSettings,
|
||||||
|
nai_settings,
|
||||||
|
} from "./scripts/nai-settings.js";
|
||||||
|
|
||||||
import { debounce, delay } from "./scripts/utils.js";
|
import { debounce, delay } from "./scripts/utils.js";
|
||||||
|
|
||||||
//exporting functions and vars for mods
|
//exporting functions and vars for mods
|
||||||
@@ -78,7 +85,7 @@ export {
|
|||||||
online_status,
|
online_status,
|
||||||
main_api,
|
main_api,
|
||||||
api_server,
|
api_server,
|
||||||
api_key_novel,
|
nai_settings,
|
||||||
token,
|
token,
|
||||||
is_send_press,
|
is_send_press,
|
||||||
default_avatar,
|
default_avatar,
|
||||||
@@ -259,23 +266,17 @@ var cycle_count_generation = 0;
|
|||||||
|
|
||||||
var swipes = false;
|
var swipes = false;
|
||||||
|
|
||||||
var anchor_order = 0;
|
let anchor_order = 0;
|
||||||
var style_anchor = true;
|
let style_anchor = true;
|
||||||
var character_anchor = true;
|
let character_anchor = true;
|
||||||
let extension_prompts = {};
|
let extension_prompts = {};
|
||||||
|
|
||||||
var main_api = "kobold";
|
var main_api = "kobold";
|
||||||
//novel settings
|
|
||||||
var temp_novel = 0.5;
|
|
||||||
var rep_pen_novel = 1;
|
|
||||||
var rep_pen_size_novel = 100;
|
|
||||||
|
|
||||||
var api_key_novel = "";
|
//novel settings
|
||||||
var novel_tier;
|
let novel_tier;
|
||||||
var model_novel = "euterpe-v2";
|
let novelai_settings;
|
||||||
var novelai_settings;
|
let novelai_setting_names;
|
||||||
var novelai_setting_names;
|
|
||||||
var preset_settings_novel = "Classic-Krake";
|
|
||||||
|
|
||||||
//css
|
//css
|
||||||
var bg1_toggle = true; // inits the BG as BG1
|
var bg1_toggle = true; // inits the BG as BG1
|
||||||
@@ -284,7 +285,7 @@ var css_send_form_display = $("<div id=send_form></div>").css("display");
|
|||||||
|
|
||||||
var colab_ini_step = 1;
|
var colab_ini_step = 1;
|
||||||
|
|
||||||
var token;
|
let token;
|
||||||
|
|
||||||
//////////// Is this needed?
|
//////////// Is this needed?
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
@@ -1115,7 +1116,7 @@ async function Generate(type, automatic_trigger, force_name2) {//encode("dsfs").
|
|||||||
this_max_context = 1024;
|
this_max_context = 1024;
|
||||||
} else {
|
} else {
|
||||||
this_max_context = 2048 - 60;//fix for fat tokens
|
this_max_context = 2048 - 60;//fix for fat tokens
|
||||||
if (model_novel == 'krake-v2') {
|
if (nai_settings.model_novel == 'krake-v2') {
|
||||||
this_max_context -= 160;
|
this_max_context -= 160;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1393,17 +1394,17 @@ async function Generate(type, automatic_trigger, force_name2) {//encode("dsfs").
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (main_api == 'novel') {
|
if (main_api == 'novel') {
|
||||||
var this_settings = novelai_settings[novelai_setting_names[preset_settings_novel]];
|
const this_settings = novelai_settings[novelai_setting_names[nai_settings.preset_settings_novel]];
|
||||||
generate_data = {
|
generate_data = {
|
||||||
"input": finalPromt,
|
"input": finalPromt,
|
||||||
"model": model_novel,
|
"model": nai_settings.model_novel,
|
||||||
"use_string": true,
|
"use_string": true,
|
||||||
"temperature": parseFloat(temp_novel),
|
"temperature": parseFloat(nai_settings.temp_novel),
|
||||||
"max_length": this_settings.max_length,
|
"max_length": this_settings.max_length,
|
||||||
"min_length": this_settings.min_length,
|
"min_length": this_settings.min_length,
|
||||||
"tail_free_sampling": this_settings.tail_free_sampling,
|
"tail_free_sampling": this_settings.tail_free_sampling,
|
||||||
"repetition_penalty": parseFloat(rep_pen_novel),
|
"repetition_penalty": parseFloat(nai_settings.rep_pen_novel),
|
||||||
"repetition_penalty_range": parseInt(rep_pen_size_novel),
|
"repetition_penalty_range": parseInt(nai_settings.rep_pen_size_novel),
|
||||||
"repetition_penalty_frequency": this_settings.repetition_penalty_frequency,
|
"repetition_penalty_frequency": this_settings.repetition_penalty_frequency,
|
||||||
"repetition_penalty_presence": this_settings.repetition_penalty_presence,
|
"repetition_penalty_presence": this_settings.repetition_penalty_presence,
|
||||||
//"stop_sequences": {{187}},
|
//"stop_sequences": {{187}},
|
||||||
@@ -1815,8 +1816,8 @@ function changeMainAPI() {
|
|||||||
$("#softprompt_block").css("display", "block");
|
$("#softprompt_block").css("display", "block");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCurrentApi && apiName === "textgenerationwebui") {
|
if (isCurrentApi && (apiName === "textgenerationwebui" || apiName === "novel")) {
|
||||||
console.log("enabling amount_gen for ooba");
|
console.log("enabling amount_gen for ooba/novel");
|
||||||
apiObj.amountGenElem.children().prop("disabled", false);
|
apiObj.amountGenElem.children().prop("disabled", false);
|
||||||
apiObj.amountGenElem.css("opacity", 1.0);
|
apiObj.amountGenElem.css("opacity", 1.0);
|
||||||
}
|
}
|
||||||
@@ -1905,41 +1906,26 @@ async function getSettings(type) {
|
|||||||
);
|
);
|
||||||
changeMainAPI();
|
changeMainAPI();
|
||||||
}
|
}
|
||||||
//load Novel API KEY is exists
|
|
||||||
if (settings.api_key_novel != undefined) {
|
|
||||||
api_key_novel = settings.api_key_novel;
|
|
||||||
$("#api_key_novel").val(api_key_novel);
|
|
||||||
}
|
|
||||||
//load the rest of the Novel settings without any checks
|
|
||||||
model_novel = settings.model_novel;
|
|
||||||
$("#model_novel_select option[value=" + model_novel + "]").attr(
|
|
||||||
"selected",
|
|
||||||
"true"
|
|
||||||
);
|
|
||||||
|
|
||||||
novelai_setting_names = data.novelai_setting_names;
|
novelai_setting_names = data.novelai_setting_names;
|
||||||
novelai_settings = data.novelai_settings;
|
novelai_settings = data.novelai_settings;
|
||||||
novelai_settings.forEach(function (item, i, arr) {
|
novelai_settings.forEach(function (item, i, arr) {
|
||||||
novelai_settings[i] = JSON.parse(item);
|
novelai_settings[i] = JSON.parse(item);
|
||||||
});
|
});
|
||||||
var arr_holder = {};
|
let arr_holder = {};
|
||||||
|
|
||||||
$("#settings_perset_novel").empty();
|
$("#settings_perset_novel").empty();
|
||||||
|
|
||||||
novelai_setting_names.forEach(function (item, i, arr) {
|
novelai_setting_names.forEach(function (item, i, arr) {
|
||||||
arr_holder[item] = i;
|
arr_holder[item] = i;
|
||||||
$("#settings_perset_novel").append(
|
$("#settings_perset_novel").append(`<option value=${i}>${item}</option>`);
|
||||||
"<option value=" + i + ">" + item + "</option>"
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
novelai_setting_names = {};
|
novelai_setting_names = {};
|
||||||
novelai_setting_names = arr_holder;
|
novelai_setting_names = arr_holder;
|
||||||
|
|
||||||
preset_settings_novel = settings.preset_settings_novel;
|
nai_settings.preset_settings_novel = settings.preset_settings_novel;
|
||||||
$(
|
$(
|
||||||
"#settings_perset_novel option[value=" +
|
`#settings_perset_novel option[value=${novelai_setting_names[nai_settings.preset_settings_novel]}]`
|
||||||
novelai_setting_names[preset_settings_novel] +
|
|
||||||
"]"
|
|
||||||
).attr("selected", "true");
|
).attr("selected", "true");
|
||||||
|
|
||||||
//Load KoboldAI settings
|
//Load KoboldAI settings
|
||||||
@@ -1948,7 +1934,8 @@ async function getSettings(type) {
|
|||||||
koboldai_settings.forEach(function (item, i, arr) {
|
koboldai_settings.forEach(function (item, i, arr) {
|
||||||
koboldai_settings[i] = JSON.parse(item);
|
koboldai_settings[i] = JSON.parse(item);
|
||||||
});
|
});
|
||||||
var arr_holder = {};
|
|
||||||
|
arr_holder = {};
|
||||||
|
|
||||||
$("#settings_perset").empty(); //RossAscends: uncommented this to prevent settings selector from doubling preset list on refresh
|
$("#settings_perset").empty(); //RossAscends: uncommented this to prevent settings selector from doubling preset list on refresh
|
||||||
$("#settings_perset").append(
|
$("#settings_perset").append(
|
||||||
@@ -1957,9 +1944,7 @@ async function getSettings(type) {
|
|||||||
|
|
||||||
koboldai_setting_names.forEach(function (item, i, arr) {
|
koboldai_setting_names.forEach(function (item, i, arr) {
|
||||||
arr_holder[item] = i;
|
arr_holder[item] = i;
|
||||||
$("#settings_perset").append(
|
$("#settings_perset").append(`<option value=${i}>${item}</option>`);
|
||||||
"<option value=" + i + ">" + item + "</option>"
|
|
||||||
);
|
|
||||||
//console.log('loading preset #'+i+' -- '+item);
|
//console.log('loading preset #'+i+' -- '+item);
|
||||||
});
|
});
|
||||||
koboldai_setting_names = {};
|
koboldai_setting_names = {};
|
||||||
@@ -1988,10 +1973,10 @@ async function getSettings(type) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$("#max_context").val(max_context);
|
$("#max_context").val(max_context);
|
||||||
$("#max_context_counter").html(max_context + " Tokens");
|
$("#max_context_counter").text(`${max_context} Tokens`);
|
||||||
|
|
||||||
$("#amount_gen").val(amount_gen);
|
$("#amount_gen").val(amount_gen);
|
||||||
$("#amount_gen_counter").html(amount_gen + " Tokens");
|
$("#amount_gen_counter").text(`${amount_gen} Tokens`);
|
||||||
|
|
||||||
swipes = !!settings.swipes; //// swipecode
|
swipes = !!settings.swipes; //// swipecode
|
||||||
$('#swipes-checkbox').prop('checked', swipes); /// swipecode
|
$('#swipes-checkbox').prop('checked', swipes); /// swipecode
|
||||||
@@ -2003,24 +1988,10 @@ async function getSettings(type) {
|
|||||||
loadKoboldSettings(settings);
|
loadKoboldSettings(settings);
|
||||||
|
|
||||||
//Novel
|
//Novel
|
||||||
temp_novel = settings.temp_novel;
|
loadNovelSettings(settings);
|
||||||
rep_pen_novel = settings.rep_pen_novel;
|
|
||||||
rep_pen_size_novel = settings.rep_pen_size_novel;
|
|
||||||
|
|
||||||
let addZeros = "";
|
|
||||||
if (isInt(temp_novel)) addZeros = ".00";
|
|
||||||
$("#temp_novel").val(temp_novel);
|
|
||||||
$("#temp_counter_novel").html(temp_novel + addZeros);
|
|
||||||
|
|
||||||
addZeros = "";
|
|
||||||
if (isInt(rep_pen_novel)) addZeros = ".00";
|
|
||||||
$("#rep_pen_novel").val(rep_pen_novel);
|
|
||||||
$("#rep_pen_counter_novel").html(rep_pen_novel + addZeros);
|
|
||||||
|
|
||||||
$("#rep_pen_size_novel").val(rep_pen_size_novel);
|
|
||||||
$("#rep_pen_size_counter_novel").html(rep_pen_size_novel + " Tokens");
|
|
||||||
|
|
||||||
//Enable GUI deference settings if GUI is selected for Kobold
|
//Enable GUI deference settings if GUI is selected for Kobold
|
||||||
|
if (main_api === "kobold") {
|
||||||
if (preset_settings == "gui") {
|
if (preset_settings == "gui") {
|
||||||
$("#settings_perset option[value=gui]")
|
$("#settings_perset option[value=gui]")
|
||||||
.attr("selected", "true")
|
.attr("selected", "true")
|
||||||
@@ -2036,6 +2007,7 @@ async function getSettings(type) {
|
|||||||
.trigger("change");
|
.trigger("change");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Load User's Name and Avatar
|
//Load User's Name and Avatar
|
||||||
|
|
||||||
@@ -2079,7 +2051,6 @@ async function getSettings(type) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
selected_button = settings.selected_button;
|
selected_button = settings.selected_button;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_checked_colab) isColab();
|
if (!is_checked_colab) isColab();
|
||||||
@@ -2101,7 +2072,6 @@ async function saveSettings(type) {
|
|||||||
api_server: api_server,
|
api_server: api_server,
|
||||||
api_server_textgenerationwebui: api_server_textgenerationwebui,
|
api_server_textgenerationwebui: api_server_textgenerationwebui,
|
||||||
preset_settings: preset_settings,
|
preset_settings: preset_settings,
|
||||||
preset_settings_novel: preset_settings_novel,
|
|
||||||
user_avatar: user_avatar,
|
user_avatar: user_avatar,
|
||||||
amount_gen: amount_gen,
|
amount_gen: amount_gen,
|
||||||
max_context: max_context,
|
max_context: max_context,
|
||||||
@@ -2109,17 +2079,13 @@ async function saveSettings(type) {
|
|||||||
style_anchor: style_anchor,
|
style_anchor: style_anchor,
|
||||||
character_anchor: character_anchor,
|
character_anchor: character_anchor,
|
||||||
main_api: main_api,
|
main_api: main_api,
|
||||||
api_key_novel: api_key_novel,
|
|
||||||
model_novel: model_novel,
|
|
||||||
temp_novel: temp_novel,
|
|
||||||
rep_pen_novel: rep_pen_novel,
|
|
||||||
rep_pen_size_novel: rep_pen_size_novel,
|
|
||||||
world_info: world_info,
|
world_info: world_info,
|
||||||
world_info_depth: world_info_depth,
|
world_info_depth: world_info_depth,
|
||||||
world_info_budget: world_info_budget,
|
world_info_budget: world_info_budget,
|
||||||
active_character: active_character,
|
active_character: active_character,
|
||||||
textgenerationwebui_settings: textgenerationwebui_settings,
|
textgenerationwebui_settings: textgenerationwebui_settings,
|
||||||
swipes: swipes,
|
swipes: swipes,
|
||||||
|
...nai_settings,
|
||||||
...kai_settings,
|
...kai_settings,
|
||||||
}),
|
}),
|
||||||
beforeSend: function () {
|
beforeSend: function () {
|
||||||
@@ -2261,7 +2227,7 @@ async function getAllCharaChats() {
|
|||||||
//************************************************************
|
//************************************************************
|
||||||
async function getStatusNovel() {
|
async function getStatusNovel() {
|
||||||
if (is_get_status_novel) {
|
if (is_get_status_novel) {
|
||||||
var data = { key: api_key_novel };
|
const data = { key: nai_settings.api_key_novel };
|
||||||
|
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
type: "POST", //
|
type: "POST", //
|
||||||
@@ -2275,24 +2241,8 @@ async function getStatusNovel() {
|
|||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.error != true) {
|
if (data.error != true) {
|
||||||
//var settings2 = JSON.parse(data);
|
|
||||||
//const getData = await response.json();
|
|
||||||
novel_tier = data.tier;
|
novel_tier = data.tier;
|
||||||
if (novel_tier == undefined) {
|
online_status = getNovelTier(novel_tier);
|
||||||
online_status = "no_connection";
|
|
||||||
}
|
|
||||||
if (novel_tier === 0) {
|
|
||||||
online_status = "Paper";
|
|
||||||
}
|
|
||||||
if (novel_tier === 1) {
|
|
||||||
online_status = "Tablet";
|
|
||||||
}
|
|
||||||
if (novel_tier === 2) {
|
|
||||||
online_status = "Scroll";
|
|
||||||
}
|
|
||||||
if (novel_tier === 3) {
|
|
||||||
online_status = "Opus";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
resultCheckStatusNovel();
|
resultCheckStatusNovel();
|
||||||
},
|
},
|
||||||
@@ -2371,7 +2321,6 @@ function setRightTabSelectedClass(selectedButtonId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function select_rm_info(text, charId = null) {
|
function select_rm_info(text, charId = null) {
|
||||||
|
|
||||||
$("#rm_info_text").html("<h3>" + text + "</h3>");
|
$("#rm_info_text").html("<h3>" + text + "</h3>");
|
||||||
|
|
||||||
selectRightMenuWithAnimation('rm_info_block');
|
selectRightMenuWithAnimation('rm_info_block');
|
||||||
@@ -3602,11 +3551,11 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
amount_gen = preset.genamt;
|
amount_gen = preset.genamt;
|
||||||
$("#amount_gen").val(amount_gen);
|
$("#amount_gen").val(amount_gen);
|
||||||
$("#amount_gen_counter").html(amount_gen);
|
$("#amount_gen_counter").text(`${amount_gen} Tokens`);
|
||||||
|
|
||||||
max_context = preset.max_length;
|
max_context = preset.max_length;
|
||||||
$("#max_context").val(max_context);
|
$("#max_context").val(max_context);
|
||||||
$("#max_context_counter").html(max_context + " Tokens");
|
$("#max_context_counter").text(`${max_context} Tokens`);
|
||||||
|
|
||||||
$("#range_block").children().prop("disabled", false);
|
$("#range_block").children().prop("disabled", false);
|
||||||
|
|
||||||
@@ -3628,33 +3577,13 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#settings_perset_novel").change(function () {
|
$("#settings_perset_novel").change(function () {
|
||||||
preset_settings_novel = $("#settings_perset_novel")
|
nai_settings.preset_settings_novel = $("#settings_perset_novel")
|
||||||
.find(":selected")
|
.find(":selected")
|
||||||
.text();
|
.text();
|
||||||
temp_novel =
|
|
||||||
novelai_settings[novelai_setting_names[preset_settings_novel]]
|
|
||||||
.temperature;
|
|
||||||
//amount_gen = koboldai_settings[koboldai_setting_names[preset_settings]].genamt;
|
|
||||||
rep_pen_novel =
|
|
||||||
novelai_settings[novelai_setting_names[preset_settings_novel]]
|
|
||||||
.repetition_penalty;
|
|
||||||
rep_pen_size_novel =
|
|
||||||
novelai_settings[novelai_setting_names[preset_settings_novel]]
|
|
||||||
.repetition_penalty_range;
|
|
||||||
$("#temp_novel").val(temp_novel);
|
|
||||||
$("#temp_counter_novel").html(temp_novel);
|
|
||||||
|
|
||||||
//$('#amount_gen').val(amount_gen);
|
const preset = novelai_settings[novelai_setting_names[nai_settings.preset_settings_novel]];
|
||||||
//$('#amount_gen_counter').html(amount_gen);
|
loadNovelPreset(preset);
|
||||||
|
|
||||||
$("#rep_pen_novel").val(rep_pen_novel);
|
|
||||||
$("#rep_pen_counter_novel").html(rep_pen_novel);
|
|
||||||
|
|
||||||
$("#rep_pen_size_novel").val(rep_pen_size_novel);
|
|
||||||
$("#rep_pen_size_counter_novel").html(rep_pen_size_novel + " Tokens");
|
|
||||||
|
|
||||||
//$("#range_block").children().prop("disabled", false);
|
|
||||||
//$("#range_block").css('opacity',1.0);
|
|
||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -3695,32 +3624,14 @@ $(document).ready(function () {
|
|||||||
{
|
{
|
||||||
sliderId: "#amount_gen",
|
sliderId: "#amount_gen",
|
||||||
counterId: "#amount_gen_counter",
|
counterId: "#amount_gen_counter",
|
||||||
format: (val) => val,
|
format: (val) => `${val} Tokens`,
|
||||||
setValue: (val) => { amount_gen = Number(val); },
|
setValue: (val) => { amount_gen = Number(val); },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sliderId: "#max_context",
|
sliderId: "#max_context",
|
||||||
counterId: "#max_context_counter",
|
counterId: "#max_context_counter",
|
||||||
format: (val) => val + " Tokens",
|
format: (val) => `${val} Tokens`,
|
||||||
setValue: (val) => { max_context = Number(val); },
|
setValue: (val) => { max_context = Number(val); },
|
||||||
},
|
|
||||||
{
|
|
||||||
sliderId: "#temp_novel",
|
|
||||||
counterId: "#temp_counter_novel",
|
|
||||||
format: (val) => isInt(val) ? val + ".00" : val,
|
|
||||||
setValue: (val) => { temp_novel = Number(val); },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
sliderId: "#rep_pen_novel",
|
|
||||||
counterId: "#rep_pen_counter_novel",
|
|
||||||
format: (val) => isInt(val) ? val + ".00" : val,
|
|
||||||
setValue: (val) => { rep_pen_novel = Number(val); },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
sliderId: "#rep_pen_size_novel",
|
|
||||||
counterId: "#rep_pen_size_counter_novel",
|
|
||||||
format: (val) => val + " Tokens",
|
|
||||||
setValue: (val) => { rep_pen_size_novel = Number(val); },
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -3729,7 +3640,7 @@ $(document).ready(function () {
|
|||||||
const value = $(this).val();
|
const value = $(this).val();
|
||||||
const formattedValue = slider.format(value);
|
const formattedValue = slider.format(value);
|
||||||
slider.setValue(value);
|
slider.setValue(value);
|
||||||
$(slider.counterId).html(formattedValue);
|
$(slider.counterId).text(formattedValue);
|
||||||
console.log('saving');
|
console.log('saving');
|
||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
});
|
});
|
||||||
@@ -3880,8 +3791,7 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(document).on("click", ".mes_edit_cancel", function () {
|
$(document).on("click", ".mes_edit_cancel", function () {
|
||||||
//var text = $(this).parent().parent().children('.mes_text').children('.edit_textarea').val();
|
let text = chat[this_edit_mes_id]["mes"];
|
||||||
var text = chat[this_edit_mes_id]["mes"];
|
|
||||||
|
|
||||||
$(this).parent().parent().children(".mes_text").empty();
|
$(this).parent().parent().children(".mes_text").empty();
|
||||||
$(this).css("display", "none");
|
$(this).css("display", "none");
|
||||||
@@ -3913,21 +3823,15 @@ $(document).ready(function () {
|
|||||||
if ($("#api_key_novel").val() != "") {
|
if ($("#api_key_novel").val() != "") {
|
||||||
$("#api_loading_novel").css("display", "inline-block");
|
$("#api_loading_novel").css("display", "inline-block");
|
||||||
$("#api_button_novel").css("display", "none");
|
$("#api_button_novel").css("display", "none");
|
||||||
api_key_novel = $("#api_key_novel").val();
|
nai_settings.api_key_novel = $.trim( $("#api_key_novel").val());
|
||||||
api_key_novel = $.trim(api_key_novel);
|
|
||||||
//console.log("1: "+api_server);
|
|
||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
is_get_status_novel = true;
|
is_get_status_novel = true;
|
||||||
is_api_button_press_novel = true;
|
is_api_button_press_novel = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#model_novel_select").change(function () {
|
|
||||||
model_novel = $("#model_novel_select").find(":selected").val();
|
|
||||||
saveSettings();
|
|
||||||
});
|
|
||||||
$("#anchor_order").change(function () {
|
$("#anchor_order").change(function () {
|
||||||
anchor_order = parseInt($("#anchor_order").find(":selected").val());
|
anchor_order = parseInt($("#anchor_order").find(":selected").val());
|
||||||
saveSettings();
|
saveSettingsDebounced();
|
||||||
});
|
});
|
||||||
|
|
||||||
//**************************CHARACTER IMPORT EXPORT*************************//
|
//**************************CHARACTER IMPORT EXPORT*************************//
|
||||||
|
Reference in New Issue
Block a user