mirror of
https://github.com/open-webui/open-webui
synced 2025-04-08 22:55:18 +00:00
feat: import models
This commit is contained in:
parent
ea69087697
commit
fad07d2049
@ -259,9 +259,11 @@
|
|||||||
console.log(savedModels);
|
console.log(savedModels);
|
||||||
|
|
||||||
for (const model of savedModels) {
|
for (const model of savedModels) {
|
||||||
await addNewModel(localStorage.token, model).catch((error) => {
|
if (model?.info ?? false) {
|
||||||
return null;
|
await addNewModel(localStorage.token, model.info).catch((error) => {
|
||||||
});
|
return null;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await models.set(await getModels(localStorage.token));
|
await models.set(await getModels(localStorage.token));
|
||||||
|
@ -163,12 +163,12 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class=" hidden lg:flex fixed bottom-0 right-0 px-3 py-3 z-10">
|
<div class=" hidden lg:flex fixed bottom-0 right-0 px-2 py-2 z-10">
|
||||||
<Tooltip content={$i18n.t('Help')} placement="left">
|
<Tooltip content={$i18n.t('Help')} placement="left">
|
||||||
<button
|
<button
|
||||||
id="show-shortcuts-button"
|
id="show-shortcuts-button"
|
||||||
bind:this={showShortcutsButtonElement}
|
bind:this={showShortcutsButtonElement}
|
||||||
class="text-gray-600 dark:text-gray-300 bg-gray-300/20 w-6 h-6 flex items-center justify-center text-xs rounded-full"
|
class="text-gray-600 dark:text-gray-300 bg-gray-300/20 size-5 flex items-center justify-center text-[0.7rem] rounded-full"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
showShortcuts = !showShortcuts;
|
showShortcuts = !showShortcuts;
|
||||||
}}
|
}}
|
||||||
|
@ -73,7 +73,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (info) {
|
if (info) {
|
||||||
// TODO: if profile image url === null, set it to default image '/favicon.png'
|
|
||||||
const res = await addNewModel(localStorage.token, {
|
const res = await addNewModel(localStorage.token, {
|
||||||
...info,
|
...info,
|
||||||
meta: {
|
meta: {
|
||||||
|
Loading…
Reference in New Issue
Block a user