{#if ollamaVersion}
{$i18n.t('Manage Ollama Models')}
{$i18n.t('Pull a model from Ollama.com')}
{ pullModelHandler(); }} disabled={modelTransferring} > {#if modelTransferring}
{:else}
{/if}
{$i18n.t('To access the available model names for downloading,')}
{$i18n.t('click here.')}
{#if Object.keys(modelDownloadStatus).length > 0} {#each Object.keys(modelDownloadStatus) as model}
{model}
{modelDownloadStatus[model].pullProgress ?? 0}%
{modelDownloadStatus[model].digest}
{/each} {/if}
{$i18n.t('Delete a model')}
{#if !deleteModelTag}
{$i18n.t('Select a model')}
{/if} {#each $models.filter((m) => m.size != null) as model}
{model.name + ' (' + (model.size / 1024 ** 3).toFixed(1) + ' GB)'}
{/each}
{ deleteModelHandler(); }} >
{$i18n.t('Experimental')}
{ showExperimentalOllama = !showExperimentalOllama; }}>{showExperimentalOllama ? $i18n.t('Show') : $i18n.t('Hide')}
{#if showExperimentalOllama}
{ uploadModelHandler(); }} >
{$i18n.t('Upload a GGUF model')}
{ if (modelUploadMode === 'file') { modelUploadMode = 'url'; } else { modelUploadMode = 'file'; } }} type="button" > {#if modelUploadMode === 'file'}
{$i18n.t('File Mode')}
{:else}
{$i18n.t('URL Mode')}
{/if}
{#if modelUploadMode === 'file'}
{ console.log(modelInputFile); }} accept=".gguf" required hidden />
{ document.getElementById('model-upload-input').click(); }} > {#if modelInputFile && modelInputFile.length > 0} {modelInputFile[0].name} {:else} Click here to select {/if}
{:else}
{/if}
{#if (modelUploadMode === 'file' && modelInputFile && modelInputFile.length > 0) || (modelUploadMode === 'url' && modelFileUrl !== '')}
{#if modelTransferring}
{:else}
{/if}
{/if}
{#if (modelUploadMode === 'file' && modelInputFile && modelInputFile.length > 0) || (modelUploadMode === 'url' && modelFileUrl !== '')}
{$i18n.t('Modelfile Content')}
{/if}
To access the GGUF models available for downloading,
{$i18n.t('click here.')}
{#if uploadProgress !== null}
{$i18n.t('Upload Progress')}
{uploadProgress ?? 0}%
{modelFileDigest}
{/if}
{/if}
{/if}
{$i18n.t('Manage LiteLLM Models')}
{$i18n.t('Add a model')}
{ showLiteLLMParams = !showLiteLLMParams; }}>{showLiteLLMParams ? $i18n.t('Advanced') : $i18n.t('Default')}
{ addLiteLLMModelHandler(); }} >
{#if showLiteLLMParams}
{$i18n.t('Model Name')}
{$i18n.t('API Base URL')}
{$i18n.t('API Key')}
{$i18n.t('API RPM')}
{/if}
{$i18n.t('Not sure what to add?')}
{$i18n.t('Click here for help')}
{$i18n.t('Delete a model')}
{#if !deleteLiteLLMModelId}
{$i18n.t('Select a model')}
{/if} {#each liteLLMModelInfo as model}
{model.model_name}
{/each}
{ deleteLiteLLMModelHandler(); }} >