{$i18n.t('Models')} / {$WEBUI_NAME}

{$i18n.t('Models')}

{#if loaded} { deleteModelHandler(selectedModel); }} /> { console.log(importFiles); let reader = new FileReader(); reader.onload = async (event) => { let savedModels = []; try { savedModels = JSON.parse(event.target.result); console.log(savedModels); } catch (e) { toast.error($i18n.t('Invalid JSON file')); return; } if (!Array.isArray(savedModels)) { toast.error($i18n.t('Invalid JSON file')); return; } try { await importModels( localStorage.token, savedModels.map((model) => model.info ?? model) ); } catch (error: any) { toast.error(`${error?.detail ?? error}`); return; } await _models.set( await getModels( localStorage.token, $config?.features?.enable_direct_connections && ($settings?.directConnections ?? null) ) ); page = 1; getModelList(); }; reader.readAsText(importFiles[0]); }} />
{ searchController?.abort(); clearTimeout(searchDebounceTimer); searchDebounceTimer = setTimeout(() => { page = 1; getModelList(); }, 300); }} /> {#if query}
{/if}
{ if (e.deltaY !== 0) { e.preventDefault(); e.currentTarget.scrollLeft += e.deltaY; } }} >
{ localStorage.workspaceViewOption = value; page = 1; await tick(); }} /> {#if (tags ?? []).length > 0} { return { value: tag, label: tag }; })} onChange={async () => { page = 1; await tick(); }} /> {/if}

{#if models !== null} {#if (models ?? []).length !== 0}
{$i18n.t('Owner')}
{$i18n.t('Actions')}
{#each models as model (model.id)} {@const localizedModelName = resolveLocalizedModelName(model, $i18n.language)} {/each}
{#if total > 30} {/if} {:else}
{hasFilters ? $i18n.t('No models found') : $i18n.t('No models yet')}
{hasFilters ? $i18n.t('Try adjusting your search or filter to find what you are looking for.') : $i18n.t('Items you create or that are shared with you will appear here.')}
{/if} {:else}
{/if}
{#if $config?.features.enable_community_sharing} {/if} {:else}
{/if}