bump defaults

This commit is contained in:
Concedo 2025-07-31 12:05:57 +08:00
parent 1976bb3f53
commit cade9f42bc
2 changed files with 16 additions and 21 deletions

View file

@ -12,7 +12,7 @@ Current version indicated by LITEVER below.
--> -->
<script id="init-config"> <script id="init-config">
const LITEVER = 265; const LITEVER = 266;
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
var localflag = urlParams.get('local'); //this will be replaced automatically in embedded kcpp var localflag = urlParams.get('local'); //this will be replaced automatically in embedded kcpp
const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_"; const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
@ -3431,7 +3431,7 @@ Current version indicated by LITEVER below.
second_ep_model:"gpt2", second_ep_model:"gpt2",
second_ep_url:"", second_ep_url:"",
max_context_length: (localflag?4096:2048), max_context_length: (localflag?4096:3072),
max_length: (localflag?512:256), max_length: (localflag?512:256),
auto_ctxlen: true, auto_ctxlen: true,
auto_genamt: true, auto_genamt: true,
@ -11027,11 +11027,6 @@ Current version indicated by LITEVER below.
document.getElementById("max_context_length_slide").max = ep_maxctx; document.getElementById("max_context_length_slide").max = ep_maxctx;
document.getElementById("max_context_length_slide_label").innerText = ep_maxctx; document.getElementById("max_context_length_slide_label").innerText = ep_maxctx;
} }
if(ep_maxctx && ep_maxctx>4096 && document.getElementById("max_length_slide").max<1024)
{
document.getElementById("max_length_slide").max = 1024;
document.getElementById("max_length_slide_label").innerText = 1024;
}
}).catch(error => { }).catch(error => {
console.log("Failed to get KAI max ctx: " + error); console.log("Failed to get KAI max ctx: " + error);
@ -11085,17 +11080,17 @@ Current version indicated by LITEVER below.
document.getElementById("max_context_length_slide").max = ep_maxctx; document.getElementById("max_context_length_slide").max = ep_maxctx;
document.getElementById("max_context_length_slide_label").innerText = ep_maxctx; document.getElementById("max_context_length_slide_label").innerText = ep_maxctx;
} }
if(ep_maxctx && ep_maxctx>=4096 && document.getElementById("max_length_slide").max<1024) if(ep_maxctx && ep_maxctx>=8192 && document.getElementById("max_length_slide").max<2048)
{
document.getElementById("max_length_slide").max = 1024;
document.getElementById("max_length_slide_label").innerText = 1024;
}
if(ep_maxctx && ep_maxctx>=16384 && document.getElementById("max_length_slide").max<2048)
{ {
document.getElementById("max_length_slide").max = 2048; document.getElementById("max_length_slide").max = 2048;
document.getElementById("max_length_slide_label").innerText = 2048; document.getElementById("max_length_slide_label").innerText = 2048;
} }
if(localflag && localsettings.max_context_length==4096 && ep_maxctx>4096) if(ep_maxctx && ep_maxctx>=16384 && document.getElementById("max_length_slide").max<4096)
{
document.getElementById("max_length_slide").max = 4096;
document.getElementById("max_length_slide_label").innerText = 4096;
}
if(localflag && localsettings.max_context_length==defaultsettings.max_context_length && ep_maxctx>4096)
{ {
localsettings.max_context_length = ep_maxctx; localsettings.max_context_length = ep_maxctx;
} }
@ -24151,7 +24146,7 @@ Current version indicated by LITEVER below.
<div class="flex" style="margin-top: 6px;"> <div class="flex" style="margin-top: 6px;">
<div id="actionmenuitems"> <div id="actionmenuitems">
<button type="button" class="btn btn-primary mainnav" id="btn_actmem" onclick="btn_memory()">Context</button> <button type="button" class="btn btn-primary mainnav" id="btn_actmem" onclick="btn_memory()">Context</button>
<button type="button" class="btn btn-primary mainnav" id="btn_actundo" onpointerdown="btn_back_longpress_start()" onpointerleave="btn_back_longpress_end()" onpointerup="btn_back_longpress_end()" onclick="btn_back()">Back</button> <button type="button" class="btn btn-primary mainnav" id="btn_actundo" onpointerdown="btn_back_longpress_start()" onpointerleave="btn_back_longpress_end()" onpointerup="btn_back_longpress_end()" onclick="btn_back()">Undo</button>
<button type="button" class="btn btn-primary mainnav" id="btn_actredo" onpointerdown="btn_redo_longpress_start()" onpointerleave="btn_redo_longpress_end()" onpointerup="btn_redo_longpress_end()" onclick="btn_redo()">Redo</button> <button type="button" class="btn btn-primary mainnav" id="btn_actredo" onpointerdown="btn_redo_longpress_start()" onpointerleave="btn_redo_longpress_end()" onpointerup="btn_redo_longpress_end()" onclick="btn_redo()">Redo</button>
<button type="button" class="btn btn-primary mainnav" id="btn_actretry" onclick="btn_retry()">Retry</button> <button type="button" class="btn btn-primary mainnav" id="btn_actretry" onclick="btn_retry()">Retry</button>
<button type="button" class="btn btn-primary bg_green mainnav" id="btn_addmedia" onclick="add_media_btn_menu()">Add File</button> <button type="button" class="btn btn-primary bg_green mainnav" id="btn_addmedia" onclick="add_media_btn_menu()">Add File</button>
@ -24200,7 +24195,7 @@ Current version indicated by LITEVER below.
<div class="flex hidden" id="actionmenu2"> <div class="flex hidden" id="actionmenu2">
<div id="actionmenuitems2" class="borderbox flex-push-right" style="margin-bottom: 2px;"> <div id="actionmenuitems2" class="borderbox flex-push-right" style="margin-bottom: 2px;">
<button type="button" class="btn btn-primary mainnav" id="btn_actmem2" onclick="btn_memory()">Context</button> <button type="button" class="btn btn-primary mainnav" id="btn_actmem2" onclick="btn_memory()">Context</button>
<button type="button" class="btn btn-primary mainnav" id="btn_actundo2" onpointerdown="btn_back_longpress_start()" onpointerleave="btn_back_longpress_end()" onpointerup="btn_back_longpress_end()" onclick="btn_back()">Back</button> <button type="button" class="btn btn-primary mainnav" id="btn_actundo2" onpointerdown="btn_back_longpress_start()" onpointerleave="btn_back_longpress_end()" onpointerup="btn_back_longpress_end()" onclick="btn_back()">Undo</button>
<button type="button" class="btn btn-primary mainnav" id="btn_actredo2" onpointerdown="btn_redo_longpress_start()" onpointerleave="btn_redo_longpress_end()" onpointerup="btn_redo_longpress_end()" onclick="btn_redo()">Redo</button> <button type="button" class="btn btn-primary mainnav" id="btn_actredo2" onpointerdown="btn_redo_longpress_start()" onpointerleave="btn_redo_longpress_end()" onpointerup="btn_redo_longpress_end()" onclick="btn_redo()">Redo</button>
<button type="button" class="btn btn-primary mainnav" id="btn_actretry2" onclick="btn_retry()">Retry</button> <button type="button" class="btn btn-primary mainnav" id="btn_actretry2" onclick="btn_retry()">Retry</button>
<button type="button" class="btn btn-primary bg_green mainnav" id="btn_addmedia2" onclick="add_media_btn_menu()">Add File</button> <button type="button" class="btn btn-primary bg_green mainnav" id="btn_addmedia2" onclick="add_media_btn_menu()">Add File</button>
@ -24702,7 +24697,7 @@ Current version indicated by LITEVER below.
<div class="settingitem"> <div class="settingitem">
<div class="settinglabel"> <div class="settinglabel">
<div class="justifyleft settingsmall">Context Size <span class="helpicon">?<span class="helptext">Maximum number of context tokens submitted to the AI. Must exceed max output tokens. Can be further increased by editing the textbox. Older models stop at 2048, newer ones can do 4096 or greater.</span></span></div> <div class="justifyleft settingsmall">Context Size <span class="helpicon">?<span class="helptext">Maximum number of context tokens submitted to the AI. Must exceed max output tokens. Can be further increased by editing the textbox. This value determines how much history text the AI remembers.</span></span></div>
<input title="Context Size" inputmode="numeric" class="justifyright flex-push-right settingsmall widerinput" id="max_context_length" oninput=" <input title="Context Size" inputmode="numeric" class="justifyright flex-push-right settingsmall widerinput" id="max_context_length" oninput="
document.getElementById('max_context_length_slide').value = this.value;"> document.getElementById('max_context_length_slide').value = this.value;">
</div> </div>
@ -24721,15 +24716,15 @@ Current version indicated by LITEVER below.
<div class="settingitem"> <div class="settingitem">
<div class="settinglabel"> <div class="settinglabel">
<div class="justifyleft settingsmall">Max Output <span class="helpicon">?<span <div class="justifyleft settingsmall">Max Output <span class="helpicon">?<span
class="helptext">Number of tokens the AI should generate. Higher numbers will take longer to generate.</span></span></div> class="helptext">Maximum number of tokens the AI should generate. Higher numbers will take longer to generate. AI can stop before the limit.</span></span></div>
<input title="Max Output" inputmode="numeric" class="justifyright flex-push-right settingsmall" id="max_length" oninput=" <input title="Max Output" inputmode="numeric" class="justifyright flex-push-right settingsmall" id="max_length" oninput="
document.getElementById('max_length_slide').value = this.value;"> document.getElementById('max_length_slide').value = this.value;">
</div> </div>
<div><input title="Max Output Slider" type="range" min="16" max="512" step="2" id="max_length_slide" oninput=" <div><input title="Max Output Slider" type="range" min="16" max="1024" step="2" id="max_length_slide" oninput="
document.getElementById('max_length').value = this.value;"></div> document.getElementById('max_length').value = this.value;"></div>
<div class="settingminmax"> <div class="settingminmax">
<div class="justifyleft">16</div> <div class="justifyleft">16</div>
<div class="justifyright" id="max_length_slide_label">512</div> <div class="justifyright" id="max_length_slide_label">1024</div>
</div> </div>
<div id="auto_genamt_panel" class="settinglabel"> <div id="auto_genamt_panel" class="settinglabel">
<div class="justifyleft settingsmall" title="Automatically lowers settings if incompatible with existing workers">Auto-Adjust Limits </div> <div class="justifyleft settingsmall" title="Automatically lowers settings if incompatible with existing workers">Auto-Adjust Limits </div>

View file

@ -82,7 +82,7 @@ ttsmodelpath = "" #if empty, not initialized
embeddingsmodelpath = "" #if empty, not initialized embeddingsmodelpath = "" #if empty, not initialized
maxctx = 8192 maxctx = 8192
maxhordectx = 0 #set to whatever maxctx is if 0 maxhordectx = 0 #set to whatever maxctx is if 0
maxhordelen = 512 maxhordelen = 1024
modelbusy = threading.Lock() modelbusy = threading.Lock()
requestsinqueue = 0 requestsinqueue = 0
defaultport = 5001 defaultport = 5001