Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
ea257636
Unverified
Commit
ea257636
authored
Nov 29, 2023
by
Anthony Cucci
Committed by
GitHub
Nov 29, 2023
Browse files
Update SettingsModal.svelte
Added context length
parent
4c4d50f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
src/lib/components/chat/SettingsModal.svelte
src/lib/components/chat/SettingsModal.svelte
+22
-2
No files found.
src/lib/components/chat/SettingsModal.svelte
View file @
ea257636
...
@@ -30,6 +30,7 @@
...
@@ -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 @@
...
@@ -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 @@
...
@@ -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 @@
...
@@ -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 @@
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment