From 1779090bdbf4d403e4dbf5df47f11eb86874dd57 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Thu, 4 Dec 2025 20:59:09 +0100 Subject: [PATCH] fix: add missing env var parameter pass through for enable async embedding (#19748) * Add enable_async parameter to embedding function * Add enable_async parameter to RAG configuration --- backend/open_webui/main.py | 1 + backend/open_webui/routers/retrieval.py | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 21a1aee043..dc4468e8e7 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1031,6 +1031,7 @@ app.state.EMBEDDING_FUNCTION = get_embedding_function( if app.state.config.RAG_EMBEDDING_ENGINE == "azure_openai" else None ), + enable_async=app.state.config.ENABLE_ASYNC_EMBEDDING, ) app.state.RERANKING_FUNCTION = get_reranking_function( diff --git a/backend/open_webui/routers/retrieval.py b/backend/open_webui/routers/retrieval.py index b7ed993895..cc2457eba7 100644 --- a/backend/open_webui/routers/retrieval.py +++ b/backend/open_webui/routers/retrieval.py @@ -1401,6 +1401,7 @@ def save_docs_to_vector_db( if request.app.state.config.RAG_EMBEDDING_ENGINE == "azure_openai" else None ), + enable_async=request.app.state.config.ENABLE_ASYNC_EMBEDDING, ) # Run async embedding in sync context