+
-
+
+
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/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/External.svelte b/src/lib/components/chat/Settings/External.svelte
new file mode 100644
index 00000000..455370eb
--- /dev/null
+++ b/src/lib/components/chat/Settings/External.svelte
@@ -0,0 +1,86 @@
+
+
+
diff --git a/src/lib/components/chat/Settings/General.svelte b/src/lib/components/chat/Settings/General.svelte
new file mode 100644
index 00000000..1aeb3802
--- /dev/null
+++ b/src/lib/components/chat/Settings/General.svelte
@@ -0,0 +1,224 @@
+
+
+
+
+
WebUI Settings
+
+
+
Theme
+
+
+ {#if theme === 'dark'}
+
+ {:else if theme === 'light'}
+
+ {/if}
+
+
+
+
+
+
+
+
+
Notification
+
+
{
+ toggleNotification();
+ }}
+ type="button"
+ >
+ {#if notificationEnabled === true}
+ On
+ {:else}
+ Off
+ {/if}
+
+
+
+
+
+ {#if $user.role === 'admin'}
+
+
+
Ollama API URL
+
+
+
+
+
{
+ updateOllamaAPIUrlHandler();
+ }}
+ >
+
+
+
+
+
+ Trouble accessing Ollama?
+
+ Click here for help.
+
+
+
+ {/if}
+
+
+
+
+
+
+ {
+ saveSettings({
+ system: system !== '' ? system : undefined
+ });
+ dispatch('save');
+ }}
+ >
+ Save
+
+
+
diff --git a/src/lib/components/chat/Settings/Interface.svelte b/src/lib/components/chat/Settings/Interface.svelte
new file mode 100644
index 00000000..50a8fe40
--- /dev/null
+++ b/src/lib/components/chat/Settings/Interface.svelte
@@ -0,0 +1,118 @@
+
+
+
diff --git a/src/lib/components/chat/Settings/Models.svelte b/src/lib/components/chat/Settings/Models.svelte
new file mode 100644
index 00000000..90655aa7
--- /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 82973864..8c06ccdc 100644
--- a/src/lib/components/chat/SettingsModal.svelte
+++ b/src/lib/components/chat/SettingsModal.svelte
@@ -1,49 +1,20 @@
@@ -887,1168 +308,44 @@