diff --git a/src/lib/components/documents/Settings/General.svelte b/src/lib/components/documents/Settings/General.svelte index 09ba937818..cacc593c5c 100644 --- a/src/lib/components/documents/Settings/General.svelte +++ b/src/lib/components/documents/Settings/General.svelte @@ -51,8 +51,12 @@ }; 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.', )); + 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; } @@ -65,19 +69,13 @@ if (res) { console.log('embeddingModelUpdateHandler:', res); if (res.status === true) { - toast.success( - $i18n.t('Model {{embedding_model}} update complete!', res), - { - duration: 1000 * 10, - } - ); + 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), - { - duration: 1000 * 10, - } - ); + toast.error($i18n.t('Model {{embedding_model}} update failed or not required!', res), { + duration: 1000 * 10 + }); } } }; @@ -180,26 +178,24 @@ {/if} -
- - +
- {$i18n.t('Update embedding model {{embedding_model}}', { embedding_model: embeddingModel.embedding_model.slice(-40) })} + {$i18n.t('Update embedding model {{embedding_model}}', { + embedding_model: embeddingModel.embedding_model.slice(-40) + })}
- - - +