- ai config ranges more compact

- fixed misuse of range-block-range class on text areas
This commit is contained in:
RossAscends
2023-04-12 14:58:00 +09:00
parent 391dc4e31c
commit 48e4e408a4
6 changed files with 211 additions and 208 deletions

View File

@ -83,7 +83,6 @@
<span class="note-link-span">?</span>
</a>
</h3>
<select id="settings_perset">
<option value="gui">GUI KoboldAI Settings</option>
</select>
@ -116,31 +115,38 @@
</div>
</div>
<div id="textgenerationwebui_api-presets">
<h3>Text generation web UI presets</h3>
<h3>Text Gen WebUI (ooba) presets</h3>
<select id="settings_preset_textgenerationwebui">
</select>
</div>
<div id="poe_api-presets">
<h3>Poe.com API Settings</h3>
<!-- just a placeholder title for the Poe.com settings panel-->
</div>
</div>
<div id="common-gen-settings-block" class="width100p">
<div id="pro-settings-block">
<div id="amount_gen_block" class="range-block">
<div class="range-block-title">
Amount generation
Response Length (tokens)
</div>
<div class="range-block-range">
<input type="range" id="amount_gen" name="volume" min="16" max="512" step="1">
</div>
<div class="range-block-counter">
<span id="amount_gen_counter">select</span>
</div>
<span id="amount_gen_counter" class="range-block-counter">select</span>
<input type="range" class="range-block-range" id="amount_gen" name="volume" min="16" max="512" step="1">
</div>
<div id="max_context_block" class="range-block">
<div class="range-block-title">
Context Size
Context Size (tokens)
</div>
<div class="range-block-range">
<input type="range" id="max_context" name="volume" min="512" max="2048" step="1">
</div>
<div class="range-block-counter">
<span id="max_context_counter">select</span>
</div>
<span id="max_context_counter" class="range-block-counter">select</span>
<input type="range" class="range-block-range" id="max_context" name="volume" min="512" max="2048" step="1">
</div>
</div>
</div>
@ -150,34 +156,34 @@
<div class="range-block-title">
Temperature
</div>
<div class="range-block-counter">
<span id="temp_counter">select</span>
</div>
<div class="range-block-range">
<input type="range" id="temp" name="volume" min="0.1" max="2.0" step="0.01">
</div>
<div class="range-block-counter">
<span id="temp_counter">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Repetition Penalty
</div>
<div class="range-block-counter">
<span id="rep_pen_counter">select</span>
Rep. Pen.
</div>
<div class="range-block-range">
<input type="range" id="rep_pen" name="volume" min="1" max="1.5" step="0.01">
</div>
<div class="range-block-counter">
<span id="rep_pen_counter">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Repetition Penalty Range
</div>
<div class="range-block-counter">
<span id="rep_pen_range_counter">select</span>
Rep. Pen. Range
</div>
<div class="range-block-range">
<input type="range" id="rep_pen_range" name="volume" min="0" max="2048" step="1">
</div>
<div class="range-block-counter">
<span id="rep_pen_range_counter">select</span>
</div>
</div>
</div>
<div id="range_block_novel">
@ -187,64 +193,62 @@
<div class="range-block-title">
Temperature
</div>
<div class="range-block-counter">
<span id="temp_counter_textgenerationwebui">select</span>
</div>
<div class="range-block-range">
<input type="range" id="temp_textgenerationwebui" name="volume" min="0.1" max="2.0" step="0.01">
</div>
<div class="range-block-counter">
<span id="temp_counter_textgenerationwebui">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Repetition Penalty
</div>
<div class="range-block-counter">
<span id="rep_pen_counter_textgenerationwebui">select</span>
Rep. Pen.
</div>
<div class="range-block-range">
<input type="range" id="rep_pen_textgenerationwebui" name="volume" min="1" max="1.5" step="0.01">
</div>
<div class="range-block-counter">
<span id="rep_pen_counter_textgenerationwebui">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Encoder Repetition Penalty
</div>
<div class="range-block-counter">
<span id="encoder_rep_pen_counter_textgenerationwebui">select</span>
Encoder Rep. Pen.
</div>
<div class="range-block-range">
<input type="range" id="encoder_rep_pen_textgenerationwebui" name="volume" min="0.8" max="1.5" step="0.01" />
</div>
<div class="range-block-counter">
<span id="encoder_rep_pen_counter_textgenerationwebui">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
No Repeat Ngram Size
</div>
<div class="range-block-counter">
<span id="no_repeat_ngram_size_counter_textgenerationwebui">select</span>
</div>
<div class="range-block-range">
<input type="range" id="no_repeat_ngram_size_textgenerationwebui" name="volume" min="0" max="20" step="1">
</div>
<div class="range-block-counter">
<span id="no_repeat_ngram_size_counter_textgenerationwebui">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Min Length
</div>
<div class="range-block-counter">
<span id="min_length_counter_textgenerationwebui">select</span>
</div>
<div class="range-block-range">
<input type="range" id="min_length_textgenerationwebui" name="volume" min="0" max="2000" step="1" />
</div>
<div class="range-block-counter">
<span id="min_length_counter_textgenerationwebui">select</span>
</div>
</div>
<div class="range-block">
<label class="checkbox_label" for="do_sample_textgenerationwebui">
<input type="checkbox" id="do_sample_textgenerationwebui" />
Do Sample
</label>
</div>
<div class="range-block">
<label class="checkbox_label" for="add_bos_token_textgenerationwebui" title="Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative.">
<input type="checkbox" id="add_bos_token_textgenerationwebui" />
Add BOS Token
@ -260,67 +264,64 @@
Alternative server URL (leave empty to use the default value).<br>
<b class="failure">Don't expose your real API keys to reverse proxies!</b>
</div>
<div class="range-block-range">
<div class="wide100p">
<input id="openai_reverse_proxy" type="text" class="text_pole" placeholder="https://api.openai.com/v1" />
</div>
</div>
<div class="range-block">
<div class="range-block-title">
OpenAI Context Size
</div>
<div class="range-block-counter">
<span id="openai_max_context_counter">select</span>
Context Size (tokens)
</div>
<div class="range-block-range">
<input type="range" id="openai_max_context" name="volume" min="512" max="4095" step="1">
</div>
<div class="range-block-counter">
<span id="openai_max_context_counter">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
OpenAI max response length (in tokens)
Max Response Length (tokens)
</div>
<div class="range-block-range">
<div class="wide100p">
<input type="number" id="openai_max_tokens" name="openai_max_tokens" class="text_pole" min="50" max="1000">
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Temperature
</div>
<div class="range-block-counter">
<span id="temp_counter_openai">select</span>
</div>
<div class="range-block-range">
<input type="range" id="temp_openai" name="volume" min="0" max="2.0" step="0.01">
</div>
<div class="range-block-counter">
<span id="temp_counter_openai">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Frequency Penalty
</div>
<div class="range-block-counter">
<span id="freq_pen_counter_openai">select</span>
</div>
<div class="range-block-range">
<input type="range" id="freq_pen_openai" name="volume" min="-2" max="2" step="0.01">
</div>
<div class="range-block-counter">
<span id="freq_pen_counter_openai">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Presence Penalty
</div>
<div class="range-block-counter">
<span id="pres_pen_counter_openai">select</span>
</div>
<div class="range-block-range">
<input type="range" id="pres_pen_openai" name="volume" min="-2" max="2" step="0.01">
</div>
<div class="range-block-counter">
<span id="pres_pen_counter_openai">select</span>
</div>
</div>
<div style="display:none" class="range-block">
<div class="range-block-title">
Logit Bias
@ -329,10 +330,10 @@
<div class="openai_logit_bias_form">
<input class="text_pole" id="openai_logit_bias_text" placeholder="text (will be converted to tokens)" />
<div class="openai_logit_bias_range_block">
<input id="openai_logit_bias_value" type="range" min="-100" value="0" max="100" />
<div class="range-block-counter">
<span id="openai_logit_bias_value_counter">select</span>
</div>
<input id="openai_logit_bias_value" type="range" min="-100" value="0" max="100" />
</div>
<input class="menu_button" id="openai_logit_bias_add" type="button" value="Add" />
</div>
@ -383,80 +384,78 @@
Nudges the bot to reply as the character only
</div>
<div class="range-block-range">
</div>
</div>
</div>
</div>
<div id="advanced-ai-config-block" class="width100p">
<div id="kobold_api-settings">
<div id="kobold-advanced-config">
<div class="range-block">
<div class="range-block-title">
Top P Sampling
</div>
<div class="range-block-counter">
<span id="top_p_counter">select</span>
Top P
</div>
<div class="range-block-range">
<input type="range" id="top_p" name="volume" min="0" max="1" step="0.01">
</div>
<div class="range-block-counter">
<span id="top_p_counter">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Top A Sampling
</div>
<div class="range-block-counter">
<span id="top_a_counter">select</span>
Top A
</div>
<div class="range-block-range">
<input type="range" id="top_a" name="volume" min="0" max="1" step="0.01">
</div>
<div class="range-block-counter">
<span id="top_a_counter">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Top K Sampling
</div>
<div class="range-block-counter">
<span id="top_k_counter">select</span>
Top K
</div>
<div class="range-block-range">
<input type="range" id="top_k" name="volume" min="0" max="100" step="1">
</div>
<div class="range-block-counter">
<span id="top_k_counter">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Typical Sampling
</div>
<div class="range-block-counter">
<span id="typical_counter">select</span>
</div>
<div class="range-block-range">
<input type="range" id="typical" name="volume" min="0" max="1" step="0.01">
</div>
<div class="range-block-counter">
<span id="typical_counter">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Tail Free Sampling
</div>
<div class="range-block-counter">
<span id="tfs_counter">select</span>
</div>
<div class="range-block-range">
<input type="range" id="tfs" name="volume" min="0" max="1" step="0.01">
</div>
<div class="range-block-counter">
<span id="tfs_counter">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Repetition Penalty Slope
</div>
<div class="range-block-counter">
<span id="rep_pen_slope_counter">select</span>
Rep. Pen. Slope
</div>
<div class="range-block-range">
<input type="range" id="rep_pen_slope" name="volume" min="0" max="10" step="0.1">
</div>
<div class="range-block-counter">
<span id="rep_pen_slope_counter">select</span>
</div>
</div>
<div class="range-block">
<label class="checkbox_label" for="single_line">
@ -476,91 +475,97 @@
<option value="euterpe-v2">Euterpe</option>
<option value="krake-v2">Krake</option>
</select>
<div class="range-block-title">
Temperature
<div class="range-block">
<div class="range-block-title">
Temperature
</div>
<div class="range-block-range">
<input type="range" id="temp_novel" name="volume" min="0.1" max="2.0" step="0.01">
</div>
<div class="range-block-counter">
<span id="temp_counter_novel">select</span>
</div>
</div>
<div class="range-block-counter">
<span id="temp_counter_novel">select</span>
<div class="range-block">
<div class="range-block-title">
Rep. Pen.
</div>
<div class="range-block-range">
<input type="range" id="rep_pen_novel" name="volume" min="1" max="1.5" step="0.01">
</div>
<div class="range-block-counter">
<span id="rep_pen_counter_novel">select</span>
</div>
</div>
<div class="range-block-range">
<input type="range" id="temp_novel" name="volume" min="0.1" max="2.0" step="0.01">
<div class="range-block">
<div class="range-block-title">
Rep. Pen. Range (tokens)
</div>
<div class="range-block-range">
<input type="range" id="rep_pen_size_novel" name="volume" min="0" max="2048" step="1">
</div>
<div class="range-block-counter">
<span id="rep_pen_size_counter_novel">select</span>
</div>
</div>
<div class="range-block-title">
Repetition Penalty
</div>
<div class="range-block-counter">
<span id="rep_pen_counter_novel">select</span>
</div>
<div class="range-block-range">
<input type="range" id="rep_pen_novel" name="volume" min="1" max="1.5" step="0.01">
</div>
<div class="range-block-title"></div>
Repetition Penalty Range
<div class="range-block-counter">
<span id="rep_pen_size_counter_novel">select</span>
</div>
<div class="range-block-range">
<input type="range" id="rep_pen_size_novel" name="volume" min="0" max="2048" step="1">
</div>
</div>
<div id="textgenerationwebui_api-settings">
<div class="range-block">
<div class="range-block-title">
Top K
</div>
<div class="range-block-counter">
<span id="top_k_counter_textgenerationwebui">select</span>
</div>
<div class="range-block-range">
<input type="range" id="top_k_textgenerationwebui" name="volume" min="0" max="200" step="1">
</div>
<div class="range-block-counter">
<span id="top_k_counter_textgenerationwebui">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Top P
</div>
<div class="range-block-counter">
<span id="top_p_counter_textgenerationwebui">select</span>
</div>
<div class="range-block-range">
<input type="range" id="top_p_textgenerationwebui" name="volume" min="0" max="1" step="0.01">
</div>
<div class="range-block-counter">
<span id="top_p_counter_textgenerationwebui">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Typical P
</div>
<div class="range-block-counter">
<span id="typical_p_counter_textgenerationwebui">select</span>
</div>
<div class="range-block-range">
<input type="range" id="typical_p_textgenerationwebui" name="volume" min="0" max="1" step="0.01">
</div>
<div class="range-block-counter">
<span id="typical_p_counter_textgenerationwebui">select</span>
</div>
</div>
<hr>
<h4>Beam search</h4>
<div class="range-block">
<div class="range-block-title">
Number of Beams
</div>
<div class="range-block-counter">
<span id="num_beams_counter_textgenerationwebui">select</span>
</div>
<div class="range-block-range">
<input type="range" id="num_beams_textgenerationwebui" name="volume" min="1" max="20" step="1" />
</div>
<div class="range-block-counter">
<span id="num_beams_counter_textgenerationwebui">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Length Penalty
</div>
<div class="range-block-counter">
<span id="length_penalty_counter_textgenerationwebui">select</span>
</div>
<div class="range-block-range">
<input type="range" id="length_penalty_textgenerationwebui" name="volume" min="-5" max="5" step="0.1" />
</div>
<div class="range-block-counter">
<span id="length_penalty_counter_textgenerationwebui">select</span>
</div>
</div>
<div class="range-block">
<label class="checkbox_label" for="early_stopping_textgenerationwebui">
@ -568,31 +573,31 @@
Early Stopping
</label>
</div>
<hr>
<h4>Contrastive search</h4>
<div class="range-block">
<div class="range-block-title">
Penalty Alpha
</div>
<div class="range-block-counter">
<span id="penalty_alpha_counter_textgenerationwebui">select</span>
</div>
<div class="range-block-range">
<input type="range" id="penalty_alpha_textgenerationwebui" name="volume" min="0" max="5" step="0.05" />
</div>
<div class="range-block-counter">
<span id="penalty_alpha_counter_textgenerationwebui">select</span>
</div>
</div>
<div class="range-block">
<div class="range-block-title">
Seed
</div>
<div style="display: none" class="range-block-counter">
<span id="seed_counter_textgenerationwebui">select</span>
</div>
<div class="range-block-range">
<input type="number" id="seed_textgenerationwebui" class="text_pole" />
</div>
<div style="display: none" class="range-block-counter">
<span id="seed_counter_textgenerationwebui">select</span>
</div>
</div>
</div>
<div id="openai_settings">
<div class="flex-container">
<div class="range-block">
@ -601,35 +606,30 @@
NSFW Toggle
</label>
</div>
<div class="range-block">
<label title="NSFW block goes first in the resulting prompt" class="checkbox_label">
<input id="nsfw_first" type="checkbox" />
NSFW first
</label>
</div>
<div class="range-block">
<label title="Inserts jailbreak as a last system message" class="checkbox_label">
<input id="jailbreak_system" type="checkbox" />
Send Jailbreak
</label>
</div>
<div class="range-block">
<label title="Enables OpenAI completion streaming" class="checkbox_label" for="stream_toggle">
<input id="stream_toggle" type="checkbox" />
Streaming
</label>
</div>
<div class="range-block">
<label title="Use OAI knowledge base to enhance definitions for public figures and known fictional characters" class="checkbox_label">
<input id="enhance_definitions" type="checkbox" />
Enhance Definitions
</label>
</div>
<div class="range-block">
<label for="wrap_in_quotes" title="Wrap user messages in quotes before sending" class="checkbox_label">
<input id="wrap_in_quotes" type="checkbox" />
@ -638,7 +638,6 @@
</div>
</div>
<br>
<div class="range-block">
<div class="range-block-title openai_restorable">
<span>Main prompt</span>
@ -649,11 +648,10 @@
<div class="range-block-counter">
The main prompt used to set the model behavior
</div>
<div class="range-block-range">
<div class="wide100p">
<textarea id="main_prompt_textarea" class="text_pole" name="main_prompt" rows="3" placeholder=""></textarea>
</div>
</div>
<div class="range-block">
<div class="range-block-title openai_restorable">
<span>NSFW prompt</span>
@ -664,11 +662,10 @@
<div class="range-block-counter">
Prompt that is used when the NSFW toggle is on
</div>
<div class="range-block-range">
<textarea id="nsfw_prompt_textarea" class="custom_textarea" name="nsfw_prompt" rows="3" placeholder=""></textarea>
<div class="wide100p">
<textarea id="nsfw_prompt_textarea" class="text_pole" name="nsfw_prompt" rows="3" placeholder=""></textarea>
</div>
</div>
<div class="range-block">
<div class="range-block-title openai_restorable">
<span>Jailbreak prompt</span>
@ -679,17 +676,15 @@
<div class="range-block-counter">
Prompt that is used when the Jailbreak toggle is on
</div>
<div class="range-block-range">
<textarea id="jailbreak_prompt_textarea" class="custom_textarea" name="jailbreak_prompt" rows="3" placeholder=""></textarea>
<div class="wide100p">
<textarea id="jailbreak_prompt_textarea" class="text_pole" name="jailbreak_prompt" rows="3" placeholder=""></textarea>
</div>
</div>
<div class="range-block openai_preset_buttons">
<input id="update_preset" class="menu_button" type="button" value="Update current preset">
<input id="new_preset" class="menu_button" type="button" value="Create new preset">
</div>
</div>
<div id="poe_settings">
<div class="range-block">
<div class="range-block-title">
@ -698,8 +693,8 @@
<div class="range-block-counter justifyLeft">
Message sent as a jailbreak to activate the roleplay
</div>
<div class="range-block-range">
<textarea id="poe_activation_message" rows="3"></textarea>
<div class="wide100p">
<textarea id="poe_activation_message" rows="10"></textarea>
</div>
</div>
<div class="range-block">
@ -709,7 +704,7 @@
<div class="range-block-counter justifyLeft">
Bot reply that counts as a successful jailbreak
</div>
<div class="range-block-range">
<div class="wide100p">
<input id="poe_activation_response" class="text_pole" type="text" />
</div>
</div>
@ -720,7 +715,7 @@
<div class="range-block-counter justifyLeft">
Text to be send as a character nudge
</div>
<div class="range-block-range">
<div class="wide100p">
<textarea id="poe_nudge_text" class="text_pole" rows="3"></textarea>
</div>
</div>
@ -741,7 +736,7 @@
<h3 id="title_api">API</h3>
<select id="main_api">
<option value="kobold">KoboldAI</option>
<option value="textgenerationwebui">Text generation web UI</option>
<option value="textgenerationwebui">Text Gen WebUI (ooba)</option>
<option value="novel">NovelAI</option>
<option value="openai">OpenAI</option>
<option value="poe">Poe</option>
@ -1114,12 +1109,12 @@
<div class="range-block-title">
<h4>Font Scale</h4>
</div>
<div class="range-block-counter">
<span id="font_scale_counter">select</span>
</div>
<div class="range-block-range">
<input type="range" id="font_scale" name="font_scale" min="0.8" max="1.2" step="0.05">
</div>
<div class="range-block-counter">
<span id="font_scale_counter">select</span>
</div>
</div>
<div id="color-picker-block" class="range-block">
<div class="range-block-title">

View File

@ -1123,7 +1123,7 @@ class StreamingProcessor {
hideSwipeButtons();
return (count_view_mes - 1);
}
onProgressStreaming(messageId, text) {
let processedText = cleanUpMessage(text);
let result = extractNameFromMessage(processedText, this.force_name2);
@ -1142,7 +1142,7 @@ class StreamingProcessor {
mesText.append(formattedText);
scrollChatToBottom();
}
onFinishStreaming(messageId, text) {
this.onProgressStreaming(messageId, text);
playMessageSound();
@ -1152,7 +1152,7 @@ class StreamingProcessor {
setGenerationProgress(0);
$('.mes_edit:last').show();
}
onErrorStreaming() {
$("#send_textarea").removeAttr('disabled');
is_send_press = false;
@ -1160,11 +1160,11 @@ class StreamingProcessor {
setGenerationProgress(0);
showSwipeButtons();
}
onStopStreaming() {
this.onErrorStreaming();
}
nullStreamingGeneration() {
throw new Error('Generation function for streaming is not hooked up');
}
@ -1439,7 +1439,7 @@ async function Generate(type, automatic_trigger, force_name2) {
console.log('post replace chat.length = ' + chat.length);
//chat2 = chat2.reverse();
var this_max_context = 1487;
if (main_api == 'kobold' || main_api == 'textgenerationwebui') {
if (main_api == 'kobold' || main_api == 'textgenerationwebui') {
this_max_context = (max_context - amount_gen);
}
if (main_api == 'novel') {
@ -1764,7 +1764,7 @@ async function Generate(type, automatic_trigger, force_name2) {
'length_penalty': textgenerationwebui_settings.length_penalty,
'early_stopping': textgenerationwebui_settings.early_stopping,
'seed': textgenerationwebui_settings.seed,
'add_bos_token': textgenerationwebui_settings.add_bos_token,
'add_bos_token': textgenerationwebui_settings.add_bos_token,
'custom_stopping_strings': getStoppingStrings().concat(textgenerationwebui_settings.custom_stopping_strings),
}
];
@ -2342,7 +2342,7 @@ function changeMainAPI() {
if (selectedVal == "poe") {
$("#amount_gen_block").css("display", "none");
} else {
$("#amount_gen_block").css("display", "block");
$("#amount_gen_block").css("display", "flex");
}
}
@ -2514,10 +2514,10 @@ async function getSettings(type) {
);
$("#max_context").val(max_context);
$("#max_context_counter").text(`${max_context} Tokens`);
$("#max_context_counter").text(`${max_context}`);
$("#amount_gen").val(amount_gen);
$("#amount_gen_counter").text(`${amount_gen} Tokens`);
$("#amount_gen_counter").text(`${amount_gen}`);
swipes = !!settings.swipes; //// swipecode
$('#swipes-checkbox').prop('checked', swipes); /// swipecode
@ -4261,11 +4261,11 @@ $(document).ready(function () {
amount_gen = preset.genamt;
$("#amount_gen").val(amount_gen);
$("#amount_gen_counter").text(`${amount_gen} Tokens`);
$("#amount_gen_counter").text(`${amount_gen}`);
max_context = preset.max_length;
$("#max_context").val(max_context);
$("#max_context_counter").text(`${max_context} Tokens`);
$("#max_context_counter").text(`${max_context}`);
$("#range_block").find('input').prop("disabled", false);
$("#kobold-advanced-config").find('input').prop("disabled", false);
@ -4340,13 +4340,13 @@ $(document).ready(function () {
{
sliderId: "#amount_gen",
counterId: "#amount_gen_counter",
format: (val) => `${val} Tokens`,
format: (val) => `${val}`,
setValue: (val) => { amount_gen = Number(val); },
},
{
sliderId: "#max_context",
counterId: "#max_context_counter",
format: (val) => `${val} Tokens`,
format: (val) => `${val}`,
setValue: (val) => { max_context = Number(val); },
}
];

View File

@ -103,7 +103,7 @@ const sliders = [
name: "rep_pen_range",
sliderId: "#rep_pen_range",
counterId: "#rep_pen_range_counter",
format: (val) => val + " Tokens",
format: (val) => val,
setValue: (val) => { kai_settings.rep_pen_range = Number(val); },
},
{
@ -161,7 +161,7 @@ $(document).ready(function () {
});
});
$('#single_line').on("input", function() {
$('#single_line').on("input", function () {
const value = $(this).prop('checked');
kai_settings.single_line = value;
saveSettingsDebounced();

View File

@ -40,10 +40,10 @@ function loadNovelPreset(preset) {
$("#rep_pen_counter_novel").html(nai_settings.rep_pen_novel);
$("#rep_pen_size_novel").val(nai_settings.rep_pen_size_novel);
$("#rep_pen_size_counter_novel").html(`${nai_settings.rep_pen_size_novel} Tokens`);
$("#rep_pen_size_counter_novel").html(`${nai_settings.rep_pen_size_novel}`);
}
function loadNovelSettings(settings){
function loadNovelSettings(settings) {
//load Novel API KEY is exists
if (settings.api_key_novel != undefined) {
nai_settings.api_key_novel = settings.api_key_novel;
@ -65,7 +65,7 @@ function loadNovelSettings(settings){
$("#rep_pen_counter_novel").text(Number(nai_settings.rep_pen_novel).toFixed(2));
$("#rep_pen_size_novel").val(nai_settings.rep_pen_size_novel);
$("#rep_pen_size_counter_novel").text(`${nai_settings.rep_pen_size_novel} Tokens`);
$("#rep_pen_size_counter_novel").text(`${nai_settings.rep_pen_size_novel}`);
}
const sliders = [
@ -84,7 +84,7 @@ const sliders = [
{
sliderId: "#rep_pen_size_novel",
counterId: "#rep_pen_size_counter_novel",
format: (val) => `${val} Tokens`,
format: (val) => `${val}`,
setValue: (val) => { nai_settings.rep_pen_size_novel = Number(val); },
},
];
@ -100,7 +100,7 @@ $(document).ready(function () {
saveSettingsDebounced();
});
});
$("#model_novel_select").change(function () {
nai_settings.model_novel = $("#model_novel_select").find(":selected").val();
saveSettingsDebounced();

View File

@ -568,7 +568,7 @@ function loadOpenAISettings(data, settings) {
$(`#model_openai_select option[value="${oai_settings.openai_model}"`).attr('selected', true).trigger('change');
$('#openai_max_context').val(oai_settings.openai_max_context);
$('#openai_max_context_counter').text(`${oai_settings.openai_max_context} Tokens`);
$('#openai_max_context_counter').text(`${oai_settings.openai_max_context}`);
$('#openai_max_tokens').val(oai_settings.openai_max_tokens);
@ -731,7 +731,7 @@ $(document).ready(function () {
$(document).on('input', '#openai_max_context', function () {
oai_settings.openai_max_context = parseInt($(this).val());
$('#openai_max_context_counter').text(`${$(this).val()} Tokens`);
$('#openai_max_context_counter').text(`${$(this).val()}`);
saveSettingsDebounced();
});
@ -842,7 +842,7 @@ $(document).ready(function () {
oai_settings.jailbreak_prompt = $('#jailbreak_prompt_textarea').val();
saveSettingsDebounced();
});
$("#main_prompt_textarea").on('input', function () {
oai_settings.main_prompt = $('#main_prompt_textarea').val();
saveSettingsDebounced();

View File

@ -617,6 +617,10 @@ select {
margin: 5px 0;
}
h3 {
margin: 10px 0;
}
#top-bar h3 {
margin: 0;
padding: 10px 0;
@ -638,13 +642,13 @@ input[type="file"] {
}
#right-nav-panel-tabs {
margin-top: 10px;
margin-top: 5px;
margin-bottom: 10px;
width: 100%;
max-height: 30px;
display: flex;
align-items: center;
padding: 0 10px;
padding: 0 5px;
}
#right-nav-panel-tabs .right_menu_button:last-of-type {
@ -1692,31 +1696,32 @@ input[type='checkbox']:not(#nav-toggle):not(#rm_button_panel_pin):not(#lm_button
.range-block {
height: min-content;
display: flex;
flex-wrap: wrap;
align-items: center;
margin-bottom: 10px;
justify-content: space-between;
}
.range-block-title {
margin: 0;
padding: 0;
width: 100%;
text-align: center;
}
.range-block-counter {
width: max-content;
display: block;
max-width: 100%;
position: relative;
margin-left: auto;
margin-right: auto;
/* margin-top: 10px; */
margin-left: 5px;
font-size: calc(var(--mainFontSize) - 0.3rem);
color: var(--white50a);
}
.range-block-range {
margin: 0 auto;
margin-bottom: 10px;
width: 100%;
margin-bottom: 10px;
margin: 0;
width: 80%;
/* margin-bottom: 10px; */
}
input[type="range"] {
@ -1731,16 +1736,6 @@ input[type="range"] {
background-size: 70% 100%;
background-repeat: no-repeat;
box-shadow: inset 0 0 2px black;
/* -webkit-appearance:none;
width:160px;
height:20px;
margin:10px 50px;
background: linear-gradient(to right, #9A2720 0%, #9A2720 100%);
background-size:150px 10px;
background-position:center;
background-repeat:no-repeat;
overflow:hidden;
outline: none; */
}
input[type="range"]::-webkit-slider-thumb {
@ -1955,19 +1950,28 @@ input[type="range"]::-webkit-slider-thumb {
display: inline;
}
h4 {
margin: 10px 0;
}
#character_popup h4 {
margin-top: 0;
/* margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-left: 0; */
}
h5 {
margin: 5px 0;
}
#character_popup h5 {
margin-top: 0;
/* margin-top: 0;
margin-bottom: 3px;
margin-left: 0;
margin-left: 0; */
color: var(--grey50);
}
#character_popup_text {
display: grid;
grid-template-columns: 50px auto;
@ -2979,7 +2983,7 @@ label[for="extensions_autoconnect"] {
margin: 0;
left: 0;
right: auto;
padding: 10px 10px 0 10px;
padding: 5px;
border-radius: 0 0 20px 0;
box-shadow: none;
}
@ -2988,9 +2992,9 @@ label[for="extensions_autoconnect"] {
width: 100%;
}
.drawer-content .text_pole {
/* .drawer-content .text_pole {
width: 100%;
}
} */
.drawer-content select {
width: 100%;
@ -3021,6 +3025,10 @@ label[for="extensions_autoconnect"] {
width: unset;
}
.wide100p {
width: 100%;
}
#openai_api-presets {
display: flex;
flex-direction: row;