(self, query: str, fileID: str, topK: int = 4)
| 562 | self.dbMap[dbId] = db |
| 563 | |
| 564 | def similarity_search(self, query: str, fileID: str, topK: int = 4) -> list[str]: |
| 565 | db = self.dbMap[fileID] |
| 566 | docs = db.similarity_search(query, k=topK) |
| 567 | texts = [] |
| 568 | for doc in docs: |
| 569 | texts.append(doc.page_content) |
| 570 | return texts |
| 571 | |
| 572 | |
| 573 | @singleton |
nothing calls this directly
no test coverage detected