diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index 1cbca519..10363df2 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -13,8 +13,16 @@ // General let API_BASE_URL = BUILD_TIME_API_BASE_URL; - let system = ''; let theme = 'dark'; + let system = ''; + + // Advanced + let requestFormat = ''; + let seed = 0; + let temperature = 0.8; + let repeat_penalty = 1.1; + let top_k = 40; + let top_p = 0.9; // Models let modelTag = ''; @@ -22,13 +30,6 @@ let digest = ''; let pullProgress = null; - // Advanced - let seed = 0; - let temperature = 0.8; - let repeat_penalty = 1.1; - let top_k = 40; - let top_p = 0.9; - // Addons let gravatarEmail = ''; let OPENAI_API_KEY = ''; @@ -88,6 +89,16 @@ document.documentElement.classList.add(theme); }; + const togglerequestFormat = async () => { + if (requestFormat === '') { + requestFormat = 'json'; + } else { + requestFormat = ''; + } + + saveSettings({ requestFormat: requestFormat !== '' ? requestFormat : undefined }); + }; + const pullModelHandler = async () => { const res = await fetch(`${API_BASE_URL}/pull`, { method: 'POST', @@ -200,6 +211,7 @@ API_BASE_URL = settings.API_BASE_URL ?? BUILD_TIME_API_BASE_URL; system = settings.system ?? ''; + requestFormat = settings.requestFormat ?? ''; seed = settings.seed ?? 0; temperature = settings.temperature ?? 0.8; repeat_penalty = settings.repeat_penalty ?? 1.1; @@ -483,9 +495,40 @@
-
Seed
-
-
+
+
Request Mode
+ + +
+
+ +
+ +
+
+
Seed
+
3 && messages.at(-3).context != undefined ? messages.at(-3).context @@ -845,6 +846,104 @@
+ +
@@ -1123,7 +1222,7 @@