GodsDevProject commited on
Commit
a3ec63b
·
verified ·
1 Parent(s): 6e008a4

Delete semantic_refine.py

Browse files
Files changed (1) hide show
  1. semantic_refine.py +0 -14
semantic_refine.py DELETED
@@ -1,14 +0,0 @@
1
- from typing import List
2
- from core.faiss_vector import FaissIndex
3
-
4
- class SemanticRefiner:
5
- def __init__(self):
6
- self.index = FaissIndex()
7
-
8
- def build_from_results(self, results: List[dict]):
9
- texts = [r.get("snippet","") for r in results if r.get("snippet")]
10
- if texts:
11
- self.index.add(texts)
12
-
13
- def refine(self, query: str, k: int = 10):
14
- return self.index.search(query, k)