Skip to content

Commit 9cf2119

Browse files
committed
update lite
1 parent c32b430 commit 9cf2119

1 file changed

Lines changed: 43 additions & 15 deletions

File tree

embd_res/klite.embd

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12860,6 +12860,25 @@ Current version indicated by LITEVER below.
1286012860
return (epchoice==7 || epchoice==10 || epchoice==11);
1286112861
}
1286212862

12863+
function find_oai_model()
12864+
{
12865+
inputBox("Find model by name (case insensitive)\nBest match will be selected.","Find model by name","","", ()=>{
12866+
let coai = getInputBoxValue().trim();
12867+
let dropdown = get_custom_ep_model_dropdown();
12868+
var mdlopt = dropdown.querySelector('option.custom_model_option');
12869+
if(coai!="")
12870+
{
12871+
coai = coai.toLowerCase();
12872+
for (var i = 0; i < dropdown.options.length; i++) {
12873+
if (dropdown.options[i].text.toLowerCase().indexOf(coai) !== -1) {
12874+
dropdown.selectedIndex = i;
12875+
break;
12876+
}
12877+
}
12878+
}
12879+
oai_model_change(ep_should_always_use_chat_completions());
12880+
},false);
12881+
}
1286312882
function select_custom_oai_model()
1286412883
{
1286512884
inputBox("Enter custom model name","Custom Model Name",localsettings.saved_oai_custommodel,"", ()=>{
@@ -13138,9 +13157,6 @@ Current version indicated by LITEVER below.
1313813157

1313913158
function toggleclaudemodel()
1314013159
{
13141-
document.getElementById("claudesystemprompt").classList.remove("hidden");
13142-
document.getElementById("claudejailbreakprompt").classList.remove("hidden");
13143-
1314413160
if(document.getElementById("custom_claude_model").value.toLowerCase().includes("claude-3-7")||
1314513161
document.getElementById("custom_claude_model").value.toLowerCase().includes("claude-sonnet-4")||
1314613162
document.getElementById("custom_claude_model").value.toLowerCase().includes("claude-haiku-4")||
@@ -20667,6 +20683,7 @@ Current version indicated by LITEVER below.
2066720683

2066820684
let sysprompt = document.getElementById("claudesystemprompt").value;
2066920685
let assistantprompt = document.getElementById("claudejailbreakprompt").value;
20686+
let assistantpromptrole = document.getElementById("claudejailbreakpromptrole").value;
2067020687
let claudethinking = (document.getElementById("claudethinking").checked?true:false);
2067120688

2067220689
claude_payload =
@@ -20730,7 +20747,8 @@ Current version indicated by LITEVER below.
2073020747
}
2073120748
if(assistantprompt)
2073220749
{
20733-
claude_payload.messages.push({"role": "assistant", "content": assistantprompt});
20750+
let usedrole = (assistantpromptrole==2)?"system":(assistantpromptrole==1?"assistant":"user");
20751+
claude_payload.messages.push({"role": usedrole, "content": assistantprompt});
2073420752
}
2073520753

2073620754

@@ -30582,7 +30600,7 @@ Current version indicated by LITEVER below.
3058230600
<input class="form-control" name="username" autocomplete="username" type="text" id="custom_oai_endpoint" placeholder="OpenAI API URL" value="" onblur="">
3058330601
<input class="form-control" name="password" autocomplete="current-password" type="password" id="custom_oai_key" placeholder="API Key (Required)" value="" onfocus="focus_api_keys()" onblur="blur_api_keys()"><br>
3058430602
Model Choice:<br>
30585-
<select title="OpenAI Model Selection" style="padding:4px;display:inline;width:calc(100% - 220px)" class="form-control" id="custom_oai_model" onchange="oai_model_change(true)">
30603+
<select title="OpenAI Model Selection" style="padding:4px;display:inline;width:calc(100% - 200px)" class="form-control" id="custom_oai_model" onchange="oai_model_change(true)">
3058630604
<option value="gpt-3.5-turbo-instruct" selected="selected">gpt-3.5-turbo-instruct</option>
3058730605
<option value="davinci-002">davinci-002</option>
3058830606
<option value="gpt-3.5-turbo">gpt-3.5-turbo</option>
@@ -30609,7 +30627,7 @@ Current version indicated by LITEVER below.
3060930627
<option value="o4-mini">o4-mini</option>
3061030628
<option style="display:none;" class="custom_model_option" value="custom">[Custom]</option>
3061130629
</select>
30612-
<select title="OpenRouter AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 220px)" class="form-control hidden" id="custom_openrouter_model" onchange="oai_model_change(true)">
30630+
<select title="OpenRouter AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 200px)" class="form-control hidden" id="custom_openrouter_model" onchange="oai_model_change(true)">
3061330631
<option value="openai/gpt-3.5-turbo">openai/gpt-3.5-turbo</option>
3061430632
<option value="openai/gpt-4">openai/gpt-4</option>
3061530633
<option value="openai/gpt-4o">openai/gpt-4o</option>
@@ -30620,7 +30638,7 @@ Current version indicated by LITEVER below.
3062030638
<option value="gryphe/mythomax-l2-13b">gryphe/mythomax-l2-13b</option>
3062130639
<option style="display:none;" class="custom_model_option" value="custom">[Custom]</option>
3062230640
</select>
30623-
<select title="Mistral AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 220px)" class="form-control hidden" id="custom_mistralai_model" onchange="oai_model_change(true)">
30641+
<select title="Mistral AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 200px)" class="form-control hidden" id="custom_mistralai_model" onchange="oai_model_change(true)">
3062430642
<option value="open-mistral-7b">open-mistral-7b</option>
3062530643
<option value="open-mistral-nemo">open-mistral-nemo</option>
3062630644
<option value="open-mixtral-8x22b">open-mixtral-8x22b</option>
@@ -30636,7 +30654,7 @@ Current version indicated by LITEVER below.
3063630654
<option value="codestral-latest">codestral-latest</option>
3063730655
<option style="display:none;" class="custom_model_option" value="custom">[Custom]</option>
3063830656
</select>
30639-
<select title="Featherless AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 220px)" class="form-control hidden" id="custom_featherless_model" onchange="oai_model_change(true)">
30657+
<select title="Featherless AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 200px)" class="form-control hidden" id="custom_featherless_model" onchange="oai_model_change(true)">
3064030658
<option value="Sao10K/L3-8B-Lunaris-v1">Sao10K/L3-8B-Lunaris-v1</option>
3064130659
<option value="Sao10K/L3-8B-Stheno-v3.2">Sao10K/L3-8B-Stheno-v3.2</option>
3064230660
<option value="unsloth/llama-3-8b-Instruct">unsloth/llama-3-8b-Instruct</option>
@@ -30650,15 +30668,15 @@ Current version indicated by LITEVER below.
3065030668
<option value="meta-llama/Meta-Llama-3.1-405B-Instruct">meta-llama/Meta-Llama-3.1-405B-Instruct</option>
3065130669
<option style="display:none;" class="custom_model_option" value="custom">[Custom]</option>
3065230670
</select>
30653-
<select title="Grok AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 220px)" class="form-control hidden" id="custom_grok_model" onchange="oai_model_change(true)">
30671+
<select title="Grok AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 200px)" class="form-control hidden" id="custom_grok_model" onchange="oai_model_change(true)">
3065430672
<option value="grok-2-1212">grok-2-1212</option>
3065530673
<option value="grok-3" selected>grok-3</option>
3065630674
<option value="grok-3-mini">grok-3-mini</option>
3065730675
<option value="grok-3-mini-fast">grok-3-mini-fast</option>
3065830676
<option value="grok-4-0709">grok-4-0709</option>
3065930677
<option style="display:none;" class="custom_model_option" value="custom">[Custom]</option>
3066030678
</select>
30661-
<select title="Pollinations AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 220px)" class="form-control hidden" id="custom_pollinations_model" onchange="oai_model_change(true)">
30679+
<select title="Pollinations AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 200px)" class="form-control hidden" id="custom_pollinations_model" onchange="oai_model_change(true)">
3066230680
<option value="bidara">bidara</option>
3066330681
<option value="chickytutor">chickytutor</option>
3066430682
<option value="gemini">gemini</option>
@@ -30668,7 +30686,7 @@ Current version indicated by LITEVER below.
3066830686
<option value="openai-fast">openai-fast</option>
3066930687
<option style="display:none;" class="custom_model_option" value="custom">[Custom]</option>
3067030688
</select>
30671-
<select title="Nvidia NIM AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 220px)" class="form-control hidden" id="custom_nvidianim_model" onchange="oai_model_change(true)">
30689+
<select title="Nvidia NIM AI Model Selection" style="padding:4px;display:inline;width:calc(100% - 200px)" class="form-control hidden" id="custom_nvidianim_model" onchange="oai_model_change(true)">
3067230690
<option value="deepseek-ai/deepseek-v3.1-terminus">deepseek-ai/deepseek-v3.1-terminus</option>
3067330691
<option value="google/gemma-3-27b-it">google/gemma-3-27b-it</option>
3067430692
<option value="meta/llama-3.3-70b-instruct">meta/llama-3.3-70b-instruct</option>
@@ -30679,8 +30697,9 @@ Current version indicated by LITEVER below.
3067930697
<option value="z-ai/glm4.7">z-ai/glm4.7</option>
3068030698
<option style="display:none;" class="custom_model_option" value="custom">[Custom]</option>
3068130699
</select>
30682-
<button type="button" class="btn btn-primary" style="display:inline;width:105px;" id="oaifetchlist" onclick="oai_fetch_models()">Fetch List</button>
30683-
<button type="button" class="btn btn-primary" style="display:inline;width:105px;" id="oaiusecustom" onclick="select_custom_oai_model()">Use Custom</button>
30700+
<button type="button" class="btn btn-primary" style="display:inline;width:42px;height:34px;vertical-align: top;" id="oaifindmodel" onclick="find_oai_model()">🔎</button>
30701+
<button type="button" class="btn btn-primary" style="display:inline;width:70px;height:34px;vertical-align: top;" id="oaifetchlist" onclick="oai_fetch_models()">Fetch</button>
30702+
<button type="button" class="btn btn-primary" style="display:inline;width:70px;height:34px;vertical-align: top;" id="oaiusecustom" onclick="select_custom_oai_model()">Custom</button>
3068430703
<div class="hidden" id="oaiemulatecompletionsbox">
3068530704
<div><input type="checkbox" id="oaiemulatecompletions" title="Emulate Completions with Prefill">
3068630705
<div class="box-label">Emulate Completions API with Prefill</div></div>
@@ -30763,8 +30782,17 @@ Current version indicated by LITEVER below.
3076330782
<input type="checkbox" title="Add endpoint version" id="claudeaddversion" onchange="" checked>
3076430783
<div class="box-label" title="Add endpoint version">Add Endpoint Version</div>
3076530784

30766-
<textarea class="form-control hidden" title="Claude System Prompt" rows="2" style="resize: vertical; line-height:1.1; padding:4px; display:inline; width: 100%" id="claudesystemprompt" placeholder="(Enter System Prompt, which steers overall AI behavior.)" onload=""></textarea>
30767-
<textarea class="form-control hidden" title="Claude Assistant Postfix" rows="2" style="resize: vertical; line-height:1.1; padding:4px; display:inline; width: 100%" id="claudejailbreakprompt" placeholder="(Enter Assistant Postfix, which forces the AI to start responses with this text.)" onload=""></textarea>
30785+
<textarea class="form-control" title="Claude System Prompt" rows="2" style="resize: vertical; line-height:1.1; padding:4px; display:inline; width: 100%" id="claudesystemprompt" placeholder="(Enter System Prompt, which steers overall AI behavior.)" onload=""></textarea>
30786+
30787+
<div style="display:flex">
30788+
<select title="Claude Postfix Role" class="form-control" style="height: 25px; font-size:12px; padding:4px;display:inline;width:100px" id="claudejailbreakpromptrole">
30789+
<option value="0">User</option>
30790+
<option value="1" selected>Assistant</option>
30791+
<option value="2">System</option>
30792+
</select>
30793+
<textarea title="Enter Claude Postfix" class="form-control" rows="2" style="resize: vertical; line-height:1.1; padding:4px; display:inline; width: 100%" id="claudejailbreakprompt" placeholder="(Enter a postfix, which forces the AI to start responses with this text.)" onload=""></textarea>
30794+
</div>
30795+
3076830796

3076930797
<div id="claudethinkingbox" class="hidden">
3077030798
<div class="box-label" title="Enable Thinking">Enable Thinking </div>

0 commit comments

Comments
 (0)