12
12
-->
13
13
14
14
<script>
15
- const LITEVER = 151 ;
15
+ const LITEVER = 152 ;
16
16
const urlParams = new URLSearchParams(window.location.search);
17
17
const localflag = urlParams.get('local');
18
18
const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
9718
9718
}
9719
9719
}
9720
9720
9721
+ function toggle_include_chatnames()
9722
+ {
9723
+ if (document.getElementById("inject_chatnames_instruct").checked) {
9724
+ document.getElementById('chatnamessection').classList.remove('hidden');
9725
+ } else {
9726
+ document.getElementById('chatnamessection').classList.add('hidden');
9727
+ }
9728
+ }
9729
+
9721
9730
function toggle_opmode() {
9722
9731
9723
9732
switch(document.getElementById('opmode').value)
9733
9742
document.getElementById('uipicker_messenger').classList.add('hidden');
9734
9743
document.getElementById('uipicker_aesthetic').classList.add('hidden');
9735
9744
document.getElementById('uipicker_corpo').classList.add('hidden');
9745
+ document.getElementById('chatnamessection').classList.add('hidden');
9746
+ document.getElementById('instructtagsection').classList.add('hidden');
9736
9747
9737
9748
if (document.getElementById('opmode').value == 1) {
9738
9749
document.getElementById('gui_type').value = localsettings.gui_type_story;
9746
9757
document.getElementById('gui_type').value = localsettings.gui_type_chat;
9747
9758
document.getElementById('uipicker_messenger').classList.remove('hidden');
9748
9759
document.getElementById('uipicker_aesthetic').classList.remove('hidden');
9760
+ document.getElementById('chatnamessection').classList.remove('hidden');
9749
9761
}
9750
9762
if (document.getElementById('opmode').value == 4) {
9751
9763
document.getElementById('gui_type').value = localsettings.gui_type_instruct;
9752
9764
document.getElementById('uipicker_aesthetic').classList.remove('hidden');
9753
9765
document.getElementById('uipicker_corpo').classList.remove('hidden');
9766
+ document.getElementById('instructtagsection').classList.remove('hidden');
9767
+ toggle_include_chatnames();
9754
9768
}
9755
9769
9756
9770
//deselect invalid
10790
10804
}
10791
10805
function ptt_end()
10792
10806
{
10807
+ var voice_end_delay = document.getElementById("voice_end_delay").value;
10793
10808
if(voice_typing_mode>0)
10794
10809
{
10795
10810
voice_is_speaking = false;
10823
10838
}
10824
10839
}
10825
10840
}
10826
- }, 280 ); //prevent premature stopping
10841
+ }, voice_end_delay ); //prevent premature stopping
10827
10842
}
10828
10843
}
10829
10844
function submit_generation_button(aesthetic_ui)
@@ -16965,18 +16980,16 @@
16965
16980
</div>
16966
16981
</div>
16967
16982
16968
- <div class="settingitem wide">
16983
+ <div class="settingitem wide" id="instructtagsection" >
16969
16984
<div class="settinglabel">
16970
16985
<div id="instructsection_basic" class="settinglabel" style="width:100%">
16971
16986
<div class="justifyleft settingsmall">Instruct Tag Preset <span class="helpicon">?<span class="helptext">Quickly select between common instruct tag formats. Different models are trained with different tags.</span></span></div>
16972
16987
<select class="form-control" id="instruct_tag_format" style="height:26px;padding:0;margin:0px 0 0;width:100%" onchange="toggle_instruct_tag_format()">
16973
16988
</select>
16974
16989
</div>
16975
16990
</div>
16976
- </div>
16977
16991
16978
- <div class="settingitem wide">
16979
- <div class="settinglabel">
16992
+ <div class="settinglabel" style="margin-top: 4px;">
16980
16993
<div class="settinglabel" style="width:100%">
16981
16994
<div class="justifyleft settingsmall" style="width:100%">Instruct Tag Format <span class="helpicon">?<span class="helptext">Specify the exact text formatting used for instruct mode.</span></span></div>
16982
16995
</div>
16986
16999
</div>
16987
17000
<div class="justifyleft" style="display: flex; width: 100%; font-size: 12px; margin:2px">
16988
17001
<div style="width:100px">Sys. Prompt <span class="helpicon">?<span class="helptext">A fixed system message sent at the very start to guide the AI behavior. Usually NOT needed</span></span></div>
16989
- <input class="settinglabel miniinput" style="width:calc(100% - 100px)" type="text" placeholder="(Unused)" value="" id="instruct_sysprompt" onchange="edit_instruct_tag_format()">
17002
+ <textarea class="settinglabel miniinput" style="resize:vertical; width:calc(100% - 100px)" rows="1" type="text" placeholder="(Unused)" value="" id="instruct_sysprompt" onchange="edit_instruct_tag_format()"></textarea >
16990
17003
</div>
16991
17004
<div class="justifyleft" style="display: flex; width: 100%; font-size: 12px; margin:2px">
16992
17005
<div style="width:100px">User Tag <span class="helpicon">?<span class="helptext">The sequence to start an instruction prompt</span></span></div>
16997
17010
<input class="settinglabel miniinput" style="width:calc(100% - 100px)" type="text" placeholder="\\n### Response:\\n" value="" id="instruct_endtag" onchange="edit_instruct_tag_format()" title="The sequence to end an instruction prompt">
16998
17011
</div>
16999
17012
</div>
17000
-
17001
17013
</div>
17002
17014
17003
- <div class="settingitem wide">
17015
+ <div class="settingitem wide" id="chatnamessection" >
17004
17016
<div class="settinglabel" style="padding-top: 3px;">
17005
17017
<div style="display:flex;width:100%;">
17006
17018
<div class="settinglabel settingcell" style="padding-bottom:0px">
17086
17098
<div class="settinglabel">
17087
17099
<div class="justifyleft settingsmall">Inject ChatNames <span class="helpicon">?<span
17088
17100
class="helptext">Appends chat names after every instruct tag, a hybrid chat mode.</span></span></div>
17089
- <input type="checkbox" id="inject_chatnames_instruct" style="margin:0px 0px 0px auto;">
17101
+ <input type="checkbox" id="inject_chatnames_instruct" style="margin:0px 0px 0px auto;" onchange="toggle_include_chatnames()" >
17090
17102
</div>
17091
17103
<div class="settinglabel">
17092
17104
<div class="justifyleft settingsmall">Assistant Jailbreak <span class="helpicon">?<span
17393
17405
<div class="settingitem">
17394
17406
<div class="settinglabel">
17395
17407
<div class="justifyleft settingsmall">TTS <span class="helpicon">?<span class="helptext">Enable Text-To-Speech to have your story automatically read to you.</span></span></div>
17396
- <select class="form-control" id="ttsselect" style="font-size:12px;height:20px;padding:0;margin:0px 0 0;width:calc(100% - 32px );" onchange="toggle_tts_mode()">
17408
+ <select class="form-control" id="ttsselect" style="font-size:12px;height:20px;padding:0;margin:0px 0 0;width:calc(100% - 35px );" onchange="toggle_tts_mode()">
17397
17409
</select>
17398
- <button id="test_tts" type="button" class="bg_green btn btn-primary" style="height:20px; width:30px; padding:2px 3px;font-size:11px;" onclick="test_tts()">Test</button>
17410
+ <button id="test_tts" type="button" class="bg_green btn btn-primary" style="height:20px; width:30px; padding:2px 3px;font-size:11px; margin-left: 2px; " onclick="test_tts()">Test</button>
17399
17411
<div id="xtts_container" class="settinglabel hidden">
17400
17412
<table width="100%"><tr>
17401
17413
<td><button id="xtts_url" type="button" class="btn btn-primary" style="width:100%; padding:2px 3px;margin-top:2px;font-size:11px;" onclick="set_xtts_url()">Set URL</button></td>
@@ -17408,31 +17420,36 @@
17408
17420
</div>
17409
17421
<div class="settinglabel">
17410
17422
<div class="justifyleft settingsmall" title="If unchecked, only speak AI replies, not other text.">Narrate Both Sides </div>
17411
- <input type="checkbox" id="narrate_both_sides" style="margin:0px 0 0 ;">
17423
+ <input type="checkbox" id="narrate_both_sides" style="margin:0px 0px 0px auto ;">
17412
17424
</div>
17413
17425
<div class="settinglabel">
17414
17426
<div class="justifyleft settingsmall" title="If unchecked, only speak AI replies, not other text.">Narrate Only Dialog </div>
17415
- <input type="checkbox" id="narrate_only_dialog" style="margin:0px 0 0 ;">
17427
+ <input type="checkbox" id="narrate_only_dialog" style="margin:0px 0px 0px auto ;">
17416
17428
</div>
17417
17429
<div class="settinglabel">
17418
17430
<div class="justifyleft settingsmall" title="Play a sound when generation is complete">Beep on Done </div>
17419
- <input type="checkbox" id="beep_on" style="margin:0px 0 0 ;">
17431
+ <input type="checkbox" id="beep_on" style="margin:0px 0px 0px auto ;">
17420
17432
</div>
17421
17433
<div class="settinglabel">
17422
17434
<div class="justifyleft settingsmall" title="Show notification when generation is complete">Notify on Done </div>
17423
- <input type="checkbox" id="notify_on" style="margin:0px 0 0 ;">
17435
+ <input type="checkbox" id="notify_on" style="margin:0px 0px 0px auto ;">
17424
17436
</div>
17425
- <div class="settinglabel">
17426
- <div class="justifyleft settingsmall" title="">Speech Ctrl. <span class="helpicon">?<span
17427
- class="helptext">Requires KoboldCpp with Whisper model loaded. Enables Speech-To-Text voice input. Automatically listens for speech in 'On' mode (Voice Detection), or use Push-To-Talk (PTT).</span></span></div>
17428
- <select style="padding:1px; height:auto; width: 60px; appearance: none; font-size: 6pt; margin:0px 0px 0px auto ;" class="form-control" id="voice_typing_mode">
17437
+
17438
+ <div class="settinglabel" style="margin-top: 5px;">
17439
+ <div class="justifyleft settingsmall">Speech Control <span class="helpicon">?<span class="helptext">Requires KoboldCpp with Whisper model loaded. Enables Speech-To-Text voice input. Automatically listens for speech in 'On' mode (Voice Detection), or use Push-To-Talk (PTT).</span></span></div>
17440
+ <select style="padding:1px; height:auto; font-size: 8pt ;" class="form-control" id="voice_typing_mode">
17429
17441
<option value="0">Off</option>
17430
17442
<option value="1">Detect Voice</option>
17431
17443
<option value="2">Push-To-Talk</option>
17432
17444
</select>
17433
17445
</div>
17446
+ <div class="inlinelabel" style="font-size: 11px;">
17447
+ <div class="justifyleft" style="padding:4px">Voice Delay: </div>
17448
+ <input type="text" inputmode="decimal" value="300" id="voice_end_delay" style="width:40px">
17449
+ </div>
17434
17450
</div>
17435
17451
17452
+
17436
17453
<div class="settingitem wide">
17437
17454
<div style="font-size:12px;">
17438
17455
<div class="settingsdesctxt">Style tags to use for generating images:<br>(E.g. Sketch, Realistic, Anime, 3D Render, Drawing)<br></div>
0 commit comments