update some defaults for max length and max ctx

This commit is contained in:
Concedo 2025-04-22 15:47:01 +08:00
parent 6dbee2f2f8
commit e8b3aeaa28
2 changed files with 10 additions and 5 deletions

View file

@ -3247,8 +3247,8 @@ Current version indicated by LITEVER below.
websearch_retain: false,
websearch_template: "",
max_context_length: (localflag?4096:1800),
max_length: (localflag?240:200),
max_context_length: (localflag?4096:2048),
max_length: (localflag?512:256),
auto_ctxlen: true,
auto_genamt: true,
rep_pen: 1.07,
@ -9663,11 +9663,16 @@ Current version indicated by LITEVER below.
document.getElementById("max_context_length_slide").max = 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>=4096 && document.getElementById("max_length_slide").max<1024)
{
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_label").innerText = 2048;
}
if(localflag && localsettings.max_context_length==4096 && ep_maxctx>4096)
{
localsettings.max_context_length = ep_maxctx;
@ -14723,7 +14728,7 @@ Current version indicated by LITEVER below.
oai_payload.logit_bias = submit_payload.params.logit_bias;
}
let is_using_o1 = custom_oai_model.toLowerCase().startsWith("o1-") || custom_oai_model.toLowerCase()=="o1" || custom_oai_model.toLowerCase().startsWith("o3-") || custom_oai_model.toLowerCase()=="o3";
let is_using_o1 = custom_oai_model.toLowerCase().startsWith("o1-") || custom_oai_model.toLowerCase()=="o1" || custom_oai_model.toLowerCase().startsWith("o3-") || custom_oai_model.toLowerCase()=="o3" || custom_oai_model.toLowerCase().startsWith("o4-") || custom_oai_model.toLowerCase()=="o4";
let is_using_4o_search = custom_oai_model.toLowerCase().includes("-search-preview");
if(is_using_o1 || is_using_4o_search)
{

View file

@ -70,7 +70,7 @@ ttsmodelpath = "" #if empty, not initialized
embeddingsmodelpath = "" #if empty, not initialized
maxctx = 4096
maxhordectx = 4096
maxhordelen = 400
maxhordelen = 512
modelbusy = threading.Lock()
requestsinqueue = 0
defaultport = 5001