From a4712989db6787e84b26eba334519a424890ca09 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 29 Nov 2023 19:58:30 -0800 Subject: [PATCH] feat: advanced settings refac --- src/lib/components/chat/SettingsModal.svelte | 367 ++++++++++++------- 1 file changed, 243 insertions(+), 124 deletions(-) diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index 4e3d4099d..31da70fea 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -26,11 +26,11 @@ // Advanced let requestFormat = ''; let seed = 0; - let temperature = 0.8; - let repeat_penalty = 1.1; - let top_k = 40; - let top_p = 0.9; - let num_ctx = 2048; + let temperature = ''; + let repeat_penalty = ''; + let top_k = ''; + let top_p = ''; + let num_ctx = ''; // Models let modelTag = ''; @@ -228,11 +228,11 @@ requestFormat = settings.requestFormat ?? ''; seed = settings.seed ?? 0; - temperature = settings.temperature ?? 0.8; - repeat_penalty = settings.repeat_penalty ?? 1.1; - top_k = settings.top_k ?? 40; - top_p = settings.top_p ?? 0.9; - num_ctx = settings.num_ctx ?? 2048; + temperature = settings.temperature ?? ''; + repeat_penalty = settings.repeat_penalty ?? ''; + top_k = settings.top_k ?? ''; + top_p = settings.top_p ?? ''; + num_ctx = settings.num_ctx ?? ''; titleAutoGenerate = settings.titleAutoGenerate ?? true; speechAutoSend = settings.speechAutoSend ?? false; @@ -614,6 +614,234 @@ {:else if selectedTab === 'advanced'}
+
+
+
Seed
+
+ +
+
+
+ +
+
+
Temperature
+ + +
+ + {#if temperature !== ''} +
+
+ +
+
+ +
+
+ {/if} +
+ +
+
+
Repeat Penalty
+ + +
+ + {#if repeat_penalty !== ''} +
+
+ +
+
+ +
+
+ {/if} +
+ +
+
+
Top K
+ + +
+ + {#if top_k !== ''} +
+
+ +
+
+ +
+
+ {/if} +
+ +
+
+
Top P
+ + +
+ + {#if top_p !== ''} +
+
+ +
+
+ +
+
+ {/if} +
+ +
+
+
Context Length
+ + +
+ + {#if num_ctx !== ''} +
+
+ +
+
+ +
+
+ {/if} +
+ +
+
Request Mode
@@ -642,115 +870,6 @@
- -
- -
-
-
Seed
-
- -
-
-
- -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
- - -