diff --git a/src/lib/components/documents/Settings/General.svelte b/src/lib/components/documents/Settings/General.svelte
index 02b813dea..09ba93781 100644
--- a/src/lib/components/documents/Settings/General.svelte
+++ b/src/lib/components/documents/Settings/General.svelte
@@ -15,6 +15,8 @@
import { onMount, getContext } from 'svelte';
import { toast } from 'svelte-sonner';
+ import Tooltip from '$lib/components/common/Tooltip.svelte';
+
const i18n = getContext('i18n');
export let saveHandler: Function;
@@ -49,16 +51,33 @@
};
const embeddingModelUpdateHandler = async () => {
+ if ((embeddingModel.embedding_model.split("/").length -1) > 1) {
+ toast.error($i18n.t('Model filesystem path detected. Model shortname is required for update, cannot continue.', ));
+ return;
+ }
+
+ console.log('Update embedding model attempt:', embeddingModel.embedding_model);
+
loading1 = true;
const res = await updateEmbeddingModel(localStorage.token, embeddingModel);
loading1 = false;
if (res) {
console.log('embeddingModelUpdateHandler:', res);
- if (res.status == true) {
- toast.success($i18n.t('Model {{embedding_model}} update complete!', res));
+ if (res.status === true) {
+ toast.success(
+ $i18n.t('Model {{embedding_model}} update complete!', res),
+ {
+ duration: 1000 * 10,
+ }
+ );
} else {
- toast.error($i18n.t('Model {{embedding_model}} update failed or not required!', res));
+ toast.error(
+ $i18n.t('Model {{embedding_model}} update failed or not required!', res),
+ {
+ duration: 1000 * 10,
+ }
+ );
}
}
};
@@ -162,65 +181,66 @@
+
+
+
+
+
-
- {$i18n.t('Update embedding model {{embedding_model}}', embeddingModel)}
-
+
-
-
+
{$i18n.t('Update')}
- {#if loading1}
-
- {/if}
-
+ @keyframes spinner_AtaB {
+ 100% {
+ transform: rotate(360deg);
+ }
+ }
+
+
+ {/if}
+
+
diff --git a/src/lib/i18n/locales/en-US/translation.json b/src/lib/i18n/locales/en-US/translation.json
index 251834e00..6813f1719 100644
--- a/src/lib/i18n/locales/en-US/translation.json
+++ b/src/lib/i18n/locales/en-US/translation.json
@@ -120,6 +120,7 @@
"Edit Doc": "",
"Edit User": "",
"Email": "",
+ "Embedding model: {{embedding_model}}": "",
"Enable Chat History": "",
"Enable New Sign Ups": "",
"Enabled": "",
@@ -193,8 +194,11 @@
"MMMM DD, YYYY": "",
"Model '{{modelName}}' has been successfully downloaded.": "",
"Model '{{modelTag}}' is already in queue for downloading.": "",
+ "Model {{embedding_model}} update complete!": "",
+ "Model {{embedding_model}} update failed or not required!": "",
"Model {{modelId}} not found": "",
"Model {{modelName}} already exists.": "",
+ "Model filesystem path detected. Model shortname is required for update, cannot continue.": "",
"Model Name": "",
"Model not selected": "",
"Model Tag Name": "",
@@ -332,7 +336,10 @@
"TTS Settings": "",
"Type Hugging Face Resolve (Download) URL": "",
"Uh-oh! There was an issue connecting to {{provider}}.": "",
+ "Understand that updating or changing your embedding model requires reset of the vector database and re-import of all documents. You have been warned!": "",
"Unknown File Type '{{file_type}}', but accepting and treating as plain text": "",
+ "Update": "",
+ "Update embedding model {{embedding_model}}": "",
"Update password": "",
"Upload a GGUF model": "",
"Upload files": "",