{ submitHandler(); saveHandler(); }} >
{$i18n.t('General Settings')}
{$i18n.t('Scan for documents from {{path}}', { path: 'DOCS_DIR (/data/docs)' })}
{ scanHandler(); console.log('check'); }} type="button" disabled={scanDirLoading} >
{$i18n.t('Scan')}
{#if scanDirLoading}
{/if}
{$i18n.t('Embedding Model Engine')}
{ if (e.target.value === 'ollama') { embeddingModel = ''; } else if (e.target.value === 'openai') { embeddingModel = 'text-embedding-3-small'; } else if (e.target.value === '') { embeddingModel = 'sentence-transformers/all-MiniLM-L6-v2'; } }} >
{$i18n.t('Default (SentenceTransformers)')}
{$i18n.t('Ollama')}
{$i18n.t('OpenAI')}
{#if embeddingEngine === 'openai'}
{$i18n.t('Embedding Batch Size')}
{/if}
{$i18n.t('Hybrid Search')}
{ toggleHybridSearch(); }} type="button" > {#if querySettings.hybrid === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Embedding Model')}
{#if embeddingEngine === 'ollama'}
{#if !embeddingModel}
{$i18n.t('Select a model')}
{/if} {#each $models.filter((m) => m.id && m.ollama && !(m?.preset ?? false)) as model}
{model.name}
{/each}
{:else}
{#if embeddingEngine === ''}
{ embeddingModelUpdateHandler(); }} disabled={updateEmbeddingModelLoading} > {#if updateEmbeddingModelLoading}
{:else}
{/if}
{/if}
{/if}
{$i18n.t( 'Warning: If you update or change your embedding model, you will need to re-import all documents.' )}
{#if querySettings.hybrid === true}
{$i18n.t('Reranking Model')}
{ rerankingModelUpdateHandler(); }} disabled={updateRerankingModelLoading} > {#if updateRerankingModelLoading}
{:else}
{/if}
{/if}
{$i18n.t('Query Params')}
{$i18n.t('Top K')}
{#if querySettings.hybrid === true}
{$i18n.t('Minimum Score')}
{/if}
{#if querySettings.hybrid === true}
{$i18n.t( 'Note: If you set a minimum score, the search will only return documents with a score greater than or equal to the minimum score.' )}
{/if}
{$i18n.t('RAG Template')}
{$i18n.t('Chunk Params')}
{$i18n.t('Chunk Size')}
{$i18n.t('Chunk Overlap')}
{$i18n.t('PDF Extract Images (OCR)')}
{ pdfExtractImages = !pdfExtractImages; }}>{pdfExtractImages ? $i18n.t('On') : $i18n.t('Off')}
{#if showResetUploadDirConfirm}
{$i18n.t('Are you sure?')}
{ const res = resetUploadDir(localStorage.token).catch((error) => { toast.error(error); return null; }); if (res) { toast.success($i18n.t('Success')); } showResetUploadDirConfirm = false; }} type="button" >
{ showResetUploadDirConfirm = false; }} >
{:else}
{ showResetUploadDirConfirm = true; }} type="button" >
{$i18n.t('Reset Upload Directory')}
{/if} {#if showResetConfirm}
{$i18n.t('Are you sure?')}
{ const res = resetVectorDB(localStorage.token).catch((error) => { toast.error(error); return null; }); if (res) { toast.success($i18n.t('Success')); } showResetConfirm = false; }} type="button" >
{ showResetConfirm = false; }} type="button" >
{:else}
{ showResetConfirm = true; }} type="button" >
{$i18n.t('Reset Vector Storage')}
{/if}
{$i18n.t('Save')}