(self, documents: list[Document], dbId: str, embedding=OpenAIEmbeddings(),
persist_directory: str = None)
| 549 | self.dbMap = {} |
| 550 | |
| 551 | def from_documents(self, documents: list[Document], dbId: str, embedding=OpenAIEmbeddings(), |
| 552 | persist_directory: str = None): |
| 553 | if persist_directory is None: |
| 554 | persist_directory = "./embedding" + dbId |
| 555 | db = Chroma.from_documents(documents, embedding=embedding, persist_directory=persist_directory) |
| 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: |
nothing calls this directly
no test coverage detected