forked from open-webui/open-webui
format fix
This commit is contained in:
parent
11741ea7f0
commit
ec530ac9f8
1 changed files with 21 additions and 25 deletions
|
@ -51,8 +51,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const embeddingModelUpdateHandler = async () => {
|
const embeddingModelUpdateHandler = async () => {
|
||||||
if ((embeddingModel.embedding_model.split("/").length -1) > 1) {
|
if (embeddingModel.embedding_model.split('/').length - 1 > 1) {
|
||||||
toast.error($i18n.t('Model filesystem path detected. Model shortname is required for update, cannot continue.', ));
|
toast.error(
|
||||||
|
$i18n.t(
|
||||||
|
'Model filesystem path detected. Model shortname is required for update, cannot continue.'
|
||||||
|
)
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,19 +69,13 @@
|
||||||
if (res) {
|
if (res) {
|
||||||
console.log('embeddingModelUpdateHandler:', res);
|
console.log('embeddingModelUpdateHandler:', res);
|
||||||
if (res.status === true) {
|
if (res.status === true) {
|
||||||
toast.success(
|
toast.success($i18n.t('Model {{embedding_model}} update complete!', res), {
|
||||||
$i18n.t('Model {{embedding_model}} update complete!', res),
|
duration: 1000 * 10
|
||||||
{
|
});
|
||||||
duration: 1000 * 10,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
toast.error(
|
toast.error($i18n.t('Model {{embedding_model}} update failed or not required!', res), {
|
||||||
$i18n.t('Model {{embedding_model}} update failed or not required!', res),
|
duration: 1000 * 10
|
||||||
{
|
});
|
||||||
duration: 1000 * 10,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -180,26 +178,24 @@
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr class=" dark:border-gray-700" />
|
<hr class=" dark:border-gray-700" />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class=" flex w-full justify-between">
|
<div class=" flex w-full justify-between">
|
||||||
<Tooltip content={
|
<Tooltip content={$i18n.t('Embedding model: {{embedding_model}}', embeddingModel)}>
|
||||||
$i18n.t('Embedding model: {{embedding_model}}', embeddingModel)
|
|
||||||
}>
|
|
||||||
|
|
||||||
<div class=" self-center text-xs font-medium">
|
<div class=" self-center text-xs font-medium">
|
||||||
{$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)
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
<Tooltip
|
||||||
<Tooltip content={
|
content={$i18n.t(
|
||||||
$i18n.t('Understand that updating or changing your embedding model requires reset of the vector database and re-import of all documents. You have been warned!')
|
'Understand that updating or changing your embedding model requires reset of the vector database and re-import of all documents. You have been warned!'
|
||||||
}>
|
)}
|
||||||
|
>
|
||||||
<button
|
<button
|
||||||
class=" self-center text-xs p-1 px-3 bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700 rounded flex flex-row space-x-1 items-center {loading1
|
class=" self-center text-xs p-1 px-3 bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-700 rounded flex flex-row space-x-1 items-center {loading1
|
||||||
? ' cursor-not-allowed'
|
? ' cursor-not-allowed'
|
||||||
|
|
Loading…
Reference in a new issue