diff --git a/backend/open_webui/utils/middleware.py b/backend/open_webui/utils/middleware.py index 8c92dc3cd..5bd0682a2 100644 --- a/backend/open_webui/utils/middleware.py +++ b/backend/open_webui/utils/middleware.py @@ -596,8 +596,8 @@ async def chat_completion_files_handler( request=request, files=files, queries=queries, - embedding_function=lambda query: request.app.state.EMBEDDING_FUNCTION( - query, user=user + embedding_function=lambda query, prefix: request.app.state.EMBEDDING_FUNCTION( + query, prefix=prefix, user=user ), k=request.app.state.config.TOP_K, reranking_function=request.app.state.rf,