forked from open-webui/open-webui
Update SettingsModal.svelte
Added context length
This commit is contained in:
parent
4c4d50f10f
commit
ea257636ee
1 changed files with 22 additions and 2 deletions
|
@ -30,6 +30,7 @@
|
||||||
let repeat_penalty = 1.1;
|
let repeat_penalty = 1.1;
|
||||||
let top_k = 40;
|
let top_k = 40;
|
||||||
let top_p = 0.9;
|
let top_p = 0.9;
|
||||||
|
let num_ctx = 2048;
|
||||||
|
|
||||||
// Models
|
// Models
|
||||||
let modelTag = '';
|
let modelTag = '';
|
||||||
|
@ -231,6 +232,7 @@
|
||||||
repeat_penalty = settings.repeat_penalty ?? 1.1;
|
repeat_penalty = settings.repeat_penalty ?? 1.1;
|
||||||
top_k = settings.top_k ?? 40;
|
top_k = settings.top_k ?? 40;
|
||||||
top_p = settings.top_p ?? 0.9;
|
top_p = settings.top_p ?? 0.9;
|
||||||
|
num_ctx = settings.num_ctx ?? 2048;
|
||||||
|
|
||||||
titleAutoGenerate = settings.titleAutoGenerate ?? true;
|
titleAutoGenerate = settings.titleAutoGenerate ?? true;
|
||||||
speechAutoSend = settings.speechAutoSend ?? false;
|
speechAutoSend = settings.speechAutoSend ?? false;
|
||||||
|
@ -732,8 +734,24 @@
|
||||||
class="w-full h-2 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
|
class="w-full h-2 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="steps-range" class=" mb-2 text-sm font-medium flex justify-between">
|
||||||
|
<div>Context Length</div>
|
||||||
|
<div>
|
||||||
|
{num_ctx}
|
||||||
|
</div></label
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
id="steps-range"
|
||||||
|
type="range"
|
||||||
|
min="0"
|
||||||
|
max="16000"
|
||||||
|
bind:value={num_ctx}
|
||||||
|
step="32"
|
||||||
|
class="w-full h-2 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end pt-3 text-sm font-medium">
|
<div class="flex justify-end pt-3 text-sm font-medium">
|
||||||
<button
|
<button
|
||||||
class=" px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-gray-100 transition rounded"
|
class=" px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-gray-100 transition rounded"
|
||||||
|
@ -743,7 +761,8 @@
|
||||||
temperature: temperature !== 0.8 ? temperature : undefined,
|
temperature: temperature !== 0.8 ? temperature : undefined,
|
||||||
repeat_penalty: repeat_penalty !== 1.1 ? repeat_penalty : undefined,
|
repeat_penalty: repeat_penalty !== 1.1 ? repeat_penalty : undefined,
|
||||||
top_k: top_k !== 40 ? top_k : undefined,
|
top_k: top_k !== 40 ? top_k : undefined,
|
||||||
top_p: top_p !== 0.9 ? top_p : undefined
|
top_p: top_p !== 0.9 ? top_p : undefined,
|
||||||
|
num_ctx: num_ctx !== 2048 ? num_ctx : undefined,
|
||||||
});
|
});
|
||||||
show = false;
|
show = false;
|
||||||
}}
|
}}
|
||||||
|
@ -752,6 +771,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{:else if selectedTab === 'models'}
|
{:else if selectedTab === 'models'}
|
||||||
<div class="flex flex-col space-y-3 text-sm mb-10">
|
<div class="flex flex-col space-y-3 text-sm mb-10">
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Reference in a new issue