mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-29 12:45:19 +00:00
23 lines
510 B
Svelte
23 lines
510 B
Svelte
<script>
|
|
import { onMount } from 'svelte';
|
|
import { config, models, settings } from '$lib/stores';
|
|
import { getModels } from '$lib/apis';
|
|
import Models from '$lib/components/workspace/Models.svelte';
|
|
|
|
onMount(async () => {
|
|
await Promise.all([
|
|
(async () => {
|
|
models.set(
|
|
await getModels(
|
|
localStorage.token,
|
|
$config?.features?.enable_direct_connections && ($settings?.directConnections ?? null)
|
|
)
|
|
);
|
|
})()
|
|
]);
|
|
});
|
|
</script>
|
|
|
|
{#if $models !== null}
|
|
<Models />
|
|
{/if}
|