enh: embedding_batch_size for local embedding engine
This commit is contained in:
@@ -795,7 +795,9 @@ def get_embedding_function(
|
|||||||
return await asyncio.to_thread(
|
return await asyncio.to_thread(
|
||||||
(
|
(
|
||||||
lambda query, prefix=None: embedding_function.encode(
|
lambda query, prefix=None: embedding_function.encode(
|
||||||
query, **({"prompt": prefix} if prefix else {})
|
query,
|
||||||
|
batch_size=int(embedding_batch_size),
|
||||||
|
**({"prompt": prefix} if prefix else {}),
|
||||||
).tolist()
|
).tolist()
|
||||||
),
|
),
|
||||||
query,
|
query,
|
||||||
|
|||||||
@@ -950,7 +950,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if RAG_EMBEDDING_ENGINE === 'ollama' || RAG_EMBEDDING_ENGINE === 'openai' || RAG_EMBEDDING_ENGINE === 'azure_openai'}
|
|
||||||
<div class=" mb-2.5 flex w-full justify-between">
|
<div class=" mb-2.5 flex w-full justify-between">
|
||||||
<div class=" self-center text-xs font-medium">
|
<div class=" self-center text-xs font-medium">
|
||||||
{$i18n.t('Embedding Batch Size')}
|
{$i18n.t('Embedding Batch Size')}
|
||||||
@@ -968,6 +967,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{#if RAG_EMBEDDING_ENGINE === 'ollama' || RAG_EMBEDDING_ENGINE === 'openai' || RAG_EMBEDDING_ENGINE === 'azure_openai'}
|
||||||
<div class=" mb-2.5 flex w-full justify-between">
|
<div class=" mb-2.5 flex w-full justify-between">
|
||||||
<div class="self-center text-xs font-medium">
|
<div class="self-center text-xs font-medium">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
|||||||
Reference in New Issue
Block a user