Merge pull request from Phlogi/fix_prefix

Fix middleware.py missing prefix on embedding function
This commit is contained in:
Timothy Jaeryang Baek 2025-03-31 14:02:49 -07:00 committed by GitHub
commit 3dc40030a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -595,8 +595,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,