MCPcopy Create free account
hub / github.com/CL-lau/SQL-GPT / from_documents

Method from_documents

embedding/embeddingHelper.py:551–556  ·  view source on GitHub ↗
(self, documents: list[Document], dbId: str, embedding=OpenAIEmbeddings(),
                       persist_directory: str = None)

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls 1

from_documentsMethod · 0.45

Tested by

no test coverage detected