(self, texts: list[str], dbId: str, embedding=OpenAIEmbeddings(), persist_directory: str = None)
| 556 | self.dbMap[dbId] = db |
| 557 | |
| 558 | def from_texts(self, texts: list[str], dbId: str, embedding=OpenAIEmbeddings(), persist_directory: str = None): |
| 559 | if persist_directory is None: |
| 560 | persist_directory = "./embedding" + dbId |
| 561 | db = Chroma.from_texts(texts, embedding=embedding, persist_directory=persist_directory) |
| 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] |
nothing calls this directly
no test coverage detected