mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-17 23:52:29 +00:00
refac
This commit is contained in:
parent
58078ab304
commit
dc98e3023f
1 changed files with 16 additions and 8 deletions
|
|
@ -40,15 +40,23 @@
|
|||
const res = await updateModelById(localStorage.token, modelInfo.id, modelInfo);
|
||||
|
||||
if (res) {
|
||||
await models.set(
|
||||
await getModels(
|
||||
localStorage.token,
|
||||
$config?.features?.enable_direct_connections && ($settings?.directConnections ?? null)
|
||||
)
|
||||
);
|
||||
toast.success($i18n.t('Model updated successfully'));
|
||||
await goto('/workspace/models');
|
||||
try {
|
||||
await models.set(
|
||||
await getModels(
|
||||
localStorage.token,
|
||||
$config?.features?.enable_direct_connections
|
||||
? ($settings?.directConnections ?? null)
|
||||
: null
|
||||
)
|
||||
);
|
||||
toast.success($i18n.t('Model updated successfully'));
|
||||
await goto('/workspace/models');
|
||||
} catch (error) {
|
||||
toast.error(`${error}`);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue