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

View File

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

View File

@ -103,7 +103,7 @@ const sliders = [
name: "rep_pen_range", name: "rep_pen_range",
sliderId: "#rep_pen_range", sliderId: "#rep_pen_range",
counterId: "#rep_pen_range_counter", counterId: "#rep_pen_range_counter",
format: (val) => val + " Tokens", format: (val) => val,
setValue: (val) => { kai_settings.rep_pen_range = Number(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'); const value = $(this).prop('checked');
kai_settings.single_line = value; kai_settings.single_line = value;
saveSettingsDebounced(); saveSettingsDebounced();

View File

@ -40,10 +40,10 @@ function loadNovelPreset(preset) {
$("#rep_pen_counter_novel").html(nai_settings.rep_pen_novel); $("#rep_pen_counter_novel").html(nai_settings.rep_pen_novel);
$("#rep_pen_size_novel").val(nai_settings.rep_pen_size_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 //load Novel API KEY is exists
if (settings.api_key_novel != undefined) { if (settings.api_key_novel != undefined) {
nai_settings.api_key_novel = settings.api_key_novel; 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_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_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 = [ const sliders = [
@ -84,7 +84,7 @@ const sliders = [
{ {
sliderId: "#rep_pen_size_novel", sliderId: "#rep_pen_size_novel",
counterId: "#rep_pen_size_counter_novel", counterId: "#rep_pen_size_counter_novel",
format: (val) => `${val} Tokens`, format: (val) => `${val}`,
setValue: (val) => { nai_settings.rep_pen_size_novel = Number(val); }, setValue: (val) => { nai_settings.rep_pen_size_novel = Number(val); },
}, },
]; ];
@ -100,7 +100,7 @@ $(document).ready(function () {
saveSettingsDebounced(); saveSettingsDebounced();
}); });
}); });
$("#model_novel_select").change(function () { $("#model_novel_select").change(function () {
nai_settings.model_novel = $("#model_novel_select").find(":selected").val(); nai_settings.model_novel = $("#model_novel_select").find(":selected").val();
saveSettingsDebounced(); 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'); $(`#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').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); $('#openai_max_tokens').val(oai_settings.openai_max_tokens);
@ -731,7 +731,7 @@ $(document).ready(function () {
$(document).on('input', '#openai_max_context', function () { $(document).on('input', '#openai_max_context', function () {
oai_settings.openai_max_context = parseInt($(this).val()); oai_settings.openai_max_context = parseInt($(this).val());
$('#openai_max_context_counter').text(`${$(this).val()} Tokens`); $('#openai_max_context_counter').text(`${$(this).val()}`);
saveSettingsDebounced(); saveSettingsDebounced();
}); });
@ -842,7 +842,7 @@ $(document).ready(function () {
oai_settings.jailbreak_prompt = $('#jailbreak_prompt_textarea').val(); oai_settings.jailbreak_prompt = $('#jailbreak_prompt_textarea').val();
saveSettingsDebounced(); saveSettingsDebounced();
}); });
$("#main_prompt_textarea").on('input', function () { $("#main_prompt_textarea").on('input', function () {
oai_settings.main_prompt = $('#main_prompt_textarea').val(); oai_settings.main_prompt = $('#main_prompt_textarea').val();
saveSettingsDebounced(); saveSettingsDebounced();

View File

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