make bm25_weight a regular parameter of query_doc.. / get_sources_from_files functions

This commit is contained in:
Jan Kessler
2025-05-20 11:46:32 +02:00
parent b5ddaf6417
commit 308d8ac04a
3 changed files with 19 additions and 4 deletions
+10
View File
@@ -1782,6 +1782,11 @@ def query_doc_handler(
if form_data.r
else request.app.state.config.RELEVANCE_THRESHOLD
),
bm25_weight=(
form_data.bm25_weight
if form_data.bm25_weight
else request.app.state.config.BM25_WEIGHT
),
user=user,
)
else:
@@ -1833,6 +1838,11 @@ def query_collection_handler(
if form_data.r
else request.app.state.config.RELEVANCE_THRESHOLD
),
bm25_weight=(
form_data.bm25_weight
if form_data.bm25_weight
else request.app.state.config.BM25_WEIGHT
),
)
else:
return query_collection(