mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-03 02:39:11 -05:00
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(
|
||||
(
|
||||
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()
|
||||
),
|
||||
query,
|
||||
|
||||
Reference in New Issue
Block a user