{#if models !== null && taskConfig}
{ updateInterfaceHandler(); dispatch('save'); }} >
{$i18n.t('Tasks')}
{$i18n.t('Task Model')}
{$i18n.t('Local Task Model')}
{ if (taskConfig.TASK_MODEL) { const model = models.find((m) => m.id === taskConfig.TASK_MODEL); if (model) { if (model?.access_control !== null) { toast.error( $i18n.t( 'This model is not publicly available. Please select another model.' ) ); } taskConfig.TASK_MODEL = model.id; } else { taskConfig.TASK_MODEL = ''; } } }} >
{$i18n.t('Current Model')}
{#each models as model}
{model.name} {model?.connection_type === 'local' ? `(${$i18n.t('Local')})` : ''}
{/each}
{$i18n.t('External Task Model')}
{ if (taskConfig.TASK_MODEL_EXTERNAL) { const model = models.find((m) => m.id === taskConfig.TASK_MODEL_EXTERNAL); if (model) { if (model?.access_control !== null) { toast.error( $i18n.t( 'This model is not publicly available. Please select another model.' ) ); } taskConfig.TASK_MODEL_EXTERNAL = model.id; } else { taskConfig.TASK_MODEL_EXTERNAL = ''; } } }} >
{$i18n.t('Current Model')}
{#each models as model}
{model.name} {model?.connection_type === 'local' ? `(${$i18n.t('Local')})` : ''}
{/each}
{$i18n.t('Title Generation')}
{#if taskConfig.ENABLE_TITLE_GENERATION}
{$i18n.t('Title Generation Prompt')}
{/if}
{$i18n.t('Voice Mode Custom Prompt')}
{ if (e.detail) { taskConfig.VOICE_MODE_PROMPT_TEMPLATE = ''; } else { taskConfig.VOICE_MODE_PROMPT_TEMPLATE = null; } }} />
{#if taskConfig.VOICE_MODE_PROMPT_TEMPLATE != null}
{$i18n.t('Voice Mode Prompt')}
{/if}
{$i18n.t('Follow Up Generation')}
{#if taskConfig.ENABLE_FOLLOW_UP_GENERATION}
{$i18n.t('Follow Up Generation Prompt')}
{/if}
{$i18n.t('Tags Generation')}
{#if taskConfig.ENABLE_TAGS_GENERATION}
{$i18n.t('Tags Generation Prompt')}
{/if}
{$i18n.t('Retrieval Query Generation')}
{$i18n.t('Web Search Query Generation')}
{$i18n.t('Query Generation Prompt')}
{$i18n.t('Autocomplete Generation')}
{#if taskConfig.ENABLE_AUTOCOMPLETE_GENERATION}
{$i18n.t('Autocomplete Generation Input Max Length')}
{/if}
{$i18n.t('Image Prompt Generation Prompt')}
{$i18n.t('Tools Function Calling Prompt')}
{$i18n.t('UI')}
{$i18n.t('Banners')}
{ if (banners.length === 0 || banners.at(-1).content !== '') { banners = [ ...banners, { id: uuidv4(), type: '', title: '', content: JSON.stringify({ de: '', en: '', fr: '', it: '' }), dismissible: true, timestamp: Math.floor(Date.now() / 1000) } ]; } }} >
{#if $user?.role === 'admin'}
{$i18n.t('Select languages for translations')}
{$i18n.t('Default Prompt Suggestions')}
{#if promptSuggestions.length > 0}
{$i18n.t('Adjusting these settings will apply changes universally to all users.')}
{/if} {/if}
{$i18n.t('Save')}
{:else}
{/if}