enh: RAG_EMBEDDING_CONCURRENT_REQUESTS

This commit is contained in:
Timothy Jaeryang Baek
2026-02-21 14:33:48 -06:00
parent 5522b91c32
commit 5d4547f934
5 changed files with 64 additions and 7 deletions
@@ -42,6 +42,7 @@
let RAG_EMBEDDING_MODEL = '';
let RAG_EMBEDDING_BATCH_SIZE = 1;
let ENABLE_ASYNC_EMBEDDING = true;
let RAG_EMBEDDING_CONCURRENT_REQUESTS = 0;
let rerankingModel = '';
@@ -104,7 +105,8 @@
RAG_EMBEDDING_ENGINE,
RAG_EMBEDDING_MODEL,
RAG_EMBEDDING_BATCH_SIZE,
ENABLE_ASYNC_EMBEDDING
ENABLE_ASYNC_EMBEDDING,
RAG_EMBEDDING_CONCURRENT_REQUESTS
});
updateEmbeddingModelLoading = true;
@@ -113,6 +115,7 @@
RAG_EMBEDDING_MODEL: RAG_EMBEDDING_MODEL,
RAG_EMBEDDING_BATCH_SIZE: RAG_EMBEDDING_BATCH_SIZE,
ENABLE_ASYNC_EMBEDDING: ENABLE_ASYNC_EMBEDDING,
RAG_EMBEDDING_CONCURRENT_REQUESTS: RAG_EMBEDDING_CONCURRENT_REQUESTS,
ollama_config: {
key: OllamaKey,
url: OllamaUrl
@@ -241,6 +244,7 @@
RAG_EMBEDDING_MODEL = embeddingConfig.RAG_EMBEDDING_MODEL;
RAG_EMBEDDING_BATCH_SIZE = embeddingConfig.RAG_EMBEDDING_BATCH_SIZE ?? 1;
ENABLE_ASYNC_EMBEDDING = embeddingConfig.ENABLE_ASYNC_EMBEDDING ?? true;
RAG_EMBEDDING_CONCURRENT_REQUESTS = embeddingConfig.RAG_EMBEDDING_CONCURRENT_REQUESTS ?? 0;
OpenAIKey = embeddingConfig.openai_config.key;
OpenAIUrl = embeddingConfig.openai_config.url;
@@ -1043,6 +1047,28 @@
<Switch bind:state={ENABLE_ASYNC_EMBEDDING} />
</div>
</div>
<div class=" mb-2.5 flex w-full justify-between">
<div class="self-center text-xs font-medium">
<Tooltip
content={$i18n.t(
'Limits the number of concurrent embedding requests. Set to 0 for unlimited.'
)}
placement="top-start"
>
{$i18n.t('Embedding Concurrent Requests')}
</Tooltip>
</div>
<div class="">
<input
bind:value={RAG_EMBEDDING_CONCURRENT_REQUESTS}
type="number"
class=" bg-transparent text-center w-14 outline-none"
min="0"
step="1"
/>
</div>
</div>
{/if}
</div>