Merge pull request #301 from ollama-webui/stop-param-fix

fix: stop param to list
This commit is contained in:
Timothy Jaeryang Baek 2023-12-27 23:52:27 -05:00 committed by GitHub
commit 8e529711da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,