+
-
+
+
diff --git a/src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte b/src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte
new file mode 100644
index 00000000..5c70dc56
--- /dev/null
+++ b/src/lib/components/chat/Settings/Advanced/AdvancedParams.svelte
@@ -0,0 +1,556 @@
+
+
+
+
+
+
+
+
+
+
Temperature
+
+
{
+ options.temperature = options.temperature === '' ? 0.8 : '';
+ }}
+ >
+ {#if options.temperature === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.temperature !== ''}
+
+ {/if}
+
+
+
+
+
Mirostat
+
+
{
+ options.mirostat = options.mirostat === '' ? 0 : '';
+ }}
+ >
+ {#if options.mirostat === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.mirostat !== ''}
+
+ {/if}
+
+
+
+
+
Mirostat Eta
+
+
{
+ options.mirostat_eta = options.mirostat_eta === '' ? 0.1 : '';
+ }}
+ >
+ {#if options.mirostat_eta === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.mirostat_eta !== ''}
+
+ {/if}
+
+
+
+
+
Mirostat Tau
+
+
{
+ options.mirostat_tau = options.mirostat_tau === '' ? 5.0 : '';
+ }}
+ >
+ {#if options.mirostat_tau === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.mirostat_tau !== ''}
+
+ {/if}
+
+
+
+
+
Top K
+
+
{
+ options.top_k = options.top_k === '' ? 40 : '';
+ }}
+ >
+ {#if options.top_k === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.top_k !== ''}
+
+ {/if}
+
+
+
+
+
Top P
+
+
{
+ options.top_p = options.top_p === '' ? 0.9 : '';
+ }}
+ >
+ {#if options.top_p === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.top_p !== ''}
+
+ {/if}
+
+
+
+
+
Repeat Penalty
+
+
{
+ options.repeat_penalty = options.repeat_penalty === '' ? 1.1 : '';
+ }}
+ >
+ {#if options.repeat_penalty === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.repeat_penalty !== ''}
+
+ {/if}
+
+
+
+
+
Repeat Last N
+
+
{
+ options.repeat_last_n = options.repeat_last_n === '' ? 64 : '';
+ }}
+ >
+ {#if options.repeat_last_n === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.repeat_last_n !== ''}
+
+ {/if}
+
+
+
+
+
Tfs Z
+
+
{
+ options.tfs_z = options.tfs_z === '' ? 1 : '';
+ }}
+ >
+ {#if options.tfs_z === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.tfs_z !== ''}
+
+ {/if}
+
+
+
+
+
Context Length
+
+
{
+ options.num_ctx = options.num_ctx === '' ? 2048 : '';
+ }}
+ >
+ {#if options.num_ctx === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.num_ctx !== ''}
+
+ {/if}
+
+
+
+
Max Tokens
+
+
{
+ options.num_predict = options.num_predict === '' ? 128 : '';
+ }}
+ >
+ {#if options.num_predict === ''}
+ Default
+ {:else}
+ Custom
+ {/if}
+
+
+
+ {#if options.num_predict !== ''}
+
+ {/if}
+
+
diff --git a/src/lib/components/chat/Settings/Audio.svelte b/src/lib/components/chat/Settings/Audio.svelte
new file mode 100644
index 00000000..289ec0bb
--- /dev/null
+++ b/src/lib/components/chat/Settings/Audio.svelte
@@ -0,0 +1,260 @@
+
+
+
diff --git a/src/lib/components/chat/Settings/Chats.svelte b/src/lib/components/chat/Settings/Chats.svelte
new file mode 100644
index 00000000..b8befb68
--- /dev/null
+++ b/src/lib/components/chat/Settings/Chats.svelte
@@ -0,0 +1,353 @@
+
+
+
+
+
+
+
Chat History
+
+
{
+ toggleSaveChatHistory();
+ }}
+ >
+ {#if saveChatHistory === true}
+
+
+ On
+ {:else}
+
+
+ Off
+ {/if}
+
+
+
+
+ This setting does not sync across browsers or devices.
+
+
+
+
+
+
+
+
{
+ document.getElementById('chat-import-input').click();
+ }}
+ >
+
+ Import Chats
+
+
{
+ exportChats();
+ }}
+ >
+
+ Export Chats
+
+
+
+
+
+ {#if showDeleteConfirm}
+
+
+
+
Are you sure?
+
+
+
+
{
+ deleteChats();
+ showDeleteConfirm = false;
+ }}
+ >
+
+
+
{
+ showDeleteConfirm = false;
+ }}
+ >
+
+
+
+
+ {:else}
+
{
+ showDeleteConfirm = true;
+ }}
+ >
+
+ Delete Chats
+
+ {/if}
+
+ {#if $user?.role === 'admin'}
+
+
+
{
+ exportAllUserChats();
+ }}
+ >
+
+ Export All Chats (All Users)
+
+
+
+
+
{
+ const res = resetVectorDB(localStorage.token).catch((error) => {
+ toast.error(error);
+ return null;
+ });
+
+ if (res) {
+ toast.success('Success');
+ }
+ }}
+ >
+
+ Reset Vector Storage
+
+ {/if}
+
+
diff --git a/src/lib/components/chat/Settings/Connections.svelte b/src/lib/components/chat/Settings/Connections.svelte
new file mode 100644
index 00000000..462d3005
--- /dev/null
+++ b/src/lib/components/chat/Settings/Connections.svelte
@@ -0,0 +1,143 @@
+
+
+
diff --git a/src/lib/components/chat/Settings/General.svelte b/src/lib/components/chat/Settings/General.svelte
new file mode 100644
index 00000000..10ee6c72
--- /dev/null
+++ b/src/lib/components/chat/Settings/General.svelte
@@ -0,0 +1,292 @@
+
+
+
+
+
+
+ {
+ saveSettings({
+ system: system !== '' ? system : undefined,
+ options: {
+ seed: (options.seed !== 0 ? options.seed : undefined) ?? 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,
+ repeat_last_n: options.repeat_last_n !== '' ? options.repeat_last_n : undefined,
+ mirostat: options.mirostat !== '' ? options.mirostat : undefined,
+ mirostat_eta: options.mirostat_eta !== '' ? options.mirostat_eta : undefined,
+ mirostat_tau: options.mirostat_tau !== '' ? options.mirostat_tau : undefined,
+ top_k: options.top_k !== '' ? options.top_k : undefined,
+ top_p: options.top_p !== '' ? options.top_p : undefined,
+ 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 ? (isNaN(keepAlive) ? keepAlive : parseInt(keepAlive)) : undefined
+ });
+ dispatch('save');
+ }}
+ >
+ Save
+
+
+
diff --git a/src/lib/components/chat/Settings/Images.svelte b/src/lib/components/chat/Settings/Images.svelte
new file mode 100644
index 00000000..94cb3213
--- /dev/null
+++ b/src/lib/components/chat/Settings/Images.svelte
@@ -0,0 +1,255 @@
+
+
+
diff --git a/src/lib/components/chat/Settings/Interface.svelte b/src/lib/components/chat/Settings/Interface.svelte
new file mode 100644
index 00000000..f2dfac5c
--- /dev/null
+++ b/src/lib/components/chat/Settings/Interface.svelte
@@ -0,0 +1,328 @@
+
+
+
diff --git a/src/lib/components/chat/Settings/Models.svelte b/src/lib/components/chat/Settings/Models.svelte
new file mode 100644
index 00000000..c7ca7908
--- /dev/null
+++ b/src/lib/components/chat/Settings/Models.svelte
@@ -0,0 +1,596 @@
+
+
+
diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte
index 03a02532..9d631f16 100644
--- a/src/lib/components/chat/SettingsModal.svelte
+++ b/src/lib/components/chat/SettingsModal.svelte
@@ -1,37 +1,20 @@
@@ -652,31 +102,31 @@
General
- {
- selectedTab = 'advanced';
- }}
- >
-
- Advanced
-
-
{#if $user?.role === 'admin'}
+ {
+ selectedTab = 'connections';
+ }}
+ >
+
+ Connections
+
+
Models {
- selectedTab = 'external';
+ selectedTab = 'images';
}}
>
@@ -720,38 +225,16 @@
class="w-4 h-4"
>
- External
+ Images