diff --git a/src/lib/components/chat/Settings/Advanced.svelte b/src/lib/components/chat/Settings/Advanced.svelte index 5396947b..48c12269 100644 --- a/src/lib/components/chat/Settings/Advanced.svelte +++ b/src/lib/components/chat/Settings/Advanced.svelte @@ -7,6 +7,8 @@ // Advanced let requestFormat = ''; + let keepAlive = null; + let options = { // Advanced seed: 0, @@ -38,6 +40,7 @@ let settings = JSON.parse(localStorage.getItem('settings') ?? '{}'); requestFormat = settings.requestFormat ?? ''; + keepAlive = settings.keepAlive ?? null; options.seed = settings.seed ?? 0; options.temperature = settings.temperature ?? ''; @@ -57,6 +60,37 @@
+
+
+
Keep Alive
+ + +
+ + {#if keepAlive !== null} +
+ +
+ {/if} +
+
Request Mode
@@ -106,7 +140,8 @@ tfs_z: options.tfs_z !== '' ? options.tfs_z : undefined, num_ctx: options.num_ctx !== '' ? options.num_ctx : undefined, num_predict: options.num_predict !== '' ? options.num_predict : undefined - } + }, + keepAlive: keepAlive ? keepAlive : undefined }); dispatch('save'); diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index a01e4d36..6b7ccb2e 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -358,7 +358,8 @@ options: { ...($settings.options ?? {}) }, - format: $settings.requestFormat ?? undefined + format: $settings.requestFormat ?? undefined, + keep_alive: $settings.keepAlive ?? undefined }); if (res && res.ok) { diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 4ff1f3bd..c1e05087 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -372,7 +372,8 @@ options: { ...($settings.options ?? {}) }, - format: $settings.requestFormat ?? undefined + format: $settings.requestFormat ?? undefined, + keep_alive: $settings.keepAlive ?? undefined }); if (res && res.ok) {