Fix Performance Issues: (#17083)

Co-authored-by: Wang Han <wanghan@zhejianglab.org>
This commit is contained in:
Han
2025-04-09 11:22:53 +08:00
committed by GitHub
parent b5498a373a
commit f1e4d5ed6c
4 changed files with 151 additions and 94 deletions

View File

@@ -29,15 +29,6 @@ class HitTestingService:
external_retrieval_model: dict,
limit: int = 10,
) -> dict:
if dataset.available_document_count == 0 or dataset.available_segment_count == 0:
return {
"query": {
"content": query,
"tsne_position": {"x": 0, "y": 0},
},
"records": [],
}
start = time.perf_counter()
# get retrieval model , if the model is not setting , using default