mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-01 16:15:07 +08:00
Fix: chunk list async issue. (#12615)
### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -371,14 +371,21 @@ async def retrieval_test():
|
|||||||
_question += await keyword_extraction(chat_mdl, _question)
|
_question += await keyword_extraction(chat_mdl, _question)
|
||||||
|
|
||||||
labels = label_question(_question, [kb])
|
labels = label_question(_question, [kb])
|
||||||
ranks = settings.retriever.retrieval(_question, embd_mdl, tenant_ids, kb_ids, page, size,
|
ranks = await asyncio.to_thread(settings.retriever.retrieval,
|
||||||
float(req.get("similarity_threshold", 0.0)),
|
_question,
|
||||||
float(req.get("vector_similarity_weight", 0.3)),
|
embd_mdl,
|
||||||
top,
|
tenant_ids,
|
||||||
local_doc_ids, rerank_mdl=rerank_mdl,
|
kb_ids,
|
||||||
highlight=req.get("highlight", False),
|
page,
|
||||||
rank_feature=labels
|
size,
|
||||||
)
|
float(req.get("similarity_threshold", 0.0)),
|
||||||
|
float(req.get("vector_similarity_weight", 0.3)),
|
||||||
|
doc_ids=local_doc_ids,
|
||||||
|
top=top,
|
||||||
|
rerank_mdl=rerank_mdl,
|
||||||
|
rank_feature=labels,
|
||||||
|
)
|
||||||
|
|
||||||
if use_kg:
|
if use_kg:
|
||||||
ck = await settings.kg_retriever.retrieval(_question,
|
ck = await settings.kg_retriever.retrieval(_question,
|
||||||
tenant_ids,
|
tenant_ids,
|
||||||
|
|||||||
Reference in New Issue
Block a user