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
This commit is contained in:
@@ -1031,6 +1031,7 @@ app.state.EMBEDDING_FUNCTION = get_embedding_function(
|
|||||||
if app.state.config.RAG_EMBEDDING_ENGINE == "azure_openai"
|
if app.state.config.RAG_EMBEDDING_ENGINE == "azure_openai"
|
||||||
else None
|
else None
|
||||||
),
|
),
|
||||||
|
enable_async=app.state.config.ENABLE_ASYNC_EMBEDDING,
|
||||||
)
|
)
|
||||||
|
|
||||||
app.state.RERANKING_FUNCTION = get_reranking_function(
|
app.state.RERANKING_FUNCTION = get_reranking_function(
|
||||||
|
|||||||
@@ -1401,6 +1401,7 @@ def save_docs_to_vector_db(
|
|||||||
if request.app.state.config.RAG_EMBEDDING_ENGINE == "azure_openai"
|
if request.app.state.config.RAG_EMBEDDING_ENGINE == "azure_openai"
|
||||||
else None
|
else None
|
||||||
),
|
),
|
||||||
|
enable_async=request.app.state.config.ENABLE_ASYNC_EMBEDDING,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Run async embedding in sync context
|
# Run async embedding in sync context
|
||||||
|
|||||||
Reference in New Issue
Block a user