refac/enh: forward user info header to reranker

This commit is contained in:
Timothy Jaeryang Baek
2025-07-14 13:59:10 +04:00
parent b4f04ff3a7
commit 0013f5c1fc
5 changed files with 54 additions and 10 deletions

View File

@@ -652,7 +652,9 @@ async def chat_completion_files_handler(
query, prefix=prefix, user=user
),
k=request.app.state.config.TOP_K,
reranking_function=request.app.state.rf,
reranking_function=lambda sentences: request.app.state.RERANKING_FUNCTION(
sentences, user=user
),
k_reranker=request.app.state.config.TOP_K_RERANKER,
r=request.app.state.config.RELEVANCE_THRESHOLD,
hybrid_bm25_weight=request.app.state.config.HYBRID_BM25_WEIGHT,