Merge pull request #9068 from df-cgdm/main

**feat** Add user related headers when calling an external embedding api
This commit is contained in:
Timothy Jaeryang Baek
2025-02-05 00:05:44 -08:00
committed by GitHub
6 changed files with 70 additions and 32 deletions

View File

@@ -634,7 +634,7 @@ async def chat_completion_files_handler(
lambda: get_sources_from_files(
files=files,
queries=queries,
embedding_function=request.app.state.EMBEDDING_FUNCTION,
embedding_function=lambda query: request.app.state.EMBEDDING_FUNCTION(query,user=user),
k=request.app.state.config.TOP_K,
reranking_function=request.app.state.rf,
r=request.app.state.config.RELEVANCE_THRESHOLD,