{#snippet modelEntry(model: Model | CustomModel, trending?: boolean)} {@const [nameSpace, modelName] = model.id.split("/")}
{#if trending}
{/if} {#if modelName} {nameSpace} / {modelName} {:else} {nameSpace} {/if} {#if "pipeline_tag" in model && model.pipeline_tag === "image-text-to-text"} {#snippet trigger(tooltip)}
{/snippet} Image text-to-text
{/if} {#if isCustom(model)} {#snippet trigger(tooltip)}
{/snippet} Custom Model
{#snippet trigger(tooltip)} {/snippet} Edit {/if}
{/snippet} {#if trending.length > 0}
Trending
{#each trending as model} {@render modelEntry(model, true)} {/each} {/if}
Custom endpoints
{#if custom.length > 0} {#each custom as model} {@render modelEntry(model, false)} {/each} {/if}
{ onClose?.(); openCustomModelConfig({ onSubmit: model => { onModelSelect?.(model.id); }, }); })} > Add a custom endpoint
{#if other.length > 0}
Other models
{#each other as model} {@render modelEntry(model, false)} {/each} {/if}