From e34133252757a7c2087b0db1b9ea7f1ad1d863a1 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 27 Dec 2023 20:51:19 -0800 Subject: [PATCH] fix: stop param to list --- src/lib/components/chat/SettingsModal.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index 8ef24d06..6fdff100 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -614,6 +614,7 @@ options.top_p = settings.top_p ?? ''; options.num_ctx = settings.num_ctx ?? ''; options = { ...options, ...settings.options }; + options.stop = (settings?.options?.stop ?? []).join(','); titleAutoGenerate = settings.titleAutoGenerate ?? true; speechAutoSend = settings.speechAutoSend ?? false; @@ -1051,7 +1052,8 @@ saveSettings({ options: { seed: (options.seed !== 0 ? options.seed : undefined) ?? undefined, - stop: options.stop !== '' ? options.stop : undefined, + stop: + options.stop !== '' ? options.stop.split(',').filter((e) => e) : undefined, temperature: options.temperature !== '' ? options.temperature : undefined, repeat_penalty: options.repeat_penalty !== '' ? options.repeat_penalty : undefined,