[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
b836c3c76b
commit
dafc7092ad
2 changed files with 2 additions and 6 deletions
|
|
@ -108,9 +108,7 @@ def decompose_query(query: str) -> list[str]:
|
|||
response = client.post(endpoint, json = payload)
|
||||
response.raise_for_status()
|
||||
data = response.json()
|
||||
content = (
|
||||
data.get("choices", [{}])[0].get("message", {}).get("content", "")
|
||||
)
|
||||
content = data.get("choices", [{}])[0].get("message", {}).get("content", "")
|
||||
queries = _parse_queries(content if isinstance(content, str) else "", q)
|
||||
logger.info("RAG query-decompose: produced queries", n = len(queries))
|
||||
return queries
|
||||
|
|
|
|||
|
|
@ -1638,9 +1638,7 @@ def _execute_search(
|
|||
) -> list[SearchHit]:
|
||||
"""Run one retrieval against an already-resolved scope. Shared by the
|
||||
/search and /prefetch endpoints."""
|
||||
candidate_k = (
|
||||
max(top_k, RAG_RERANK_CANDIDATE_K) if enable_rerank else top_k
|
||||
)
|
||||
candidate_k = max(top_k, RAG_RERANK_CANDIDATE_K) if enable_rerank else top_k
|
||||
|
||||
if mode == "bm25":
|
||||
hits = retrieval.retrieve_bm25(scope, query, candidate_k)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue