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

Method from_texts

embedding/embeddingHelper.py:558–562  ·  view source on GitHub ↗
(self, texts: list[str], dbId: str, embedding=OpenAIEmbeddings(), persist_directory: str = None)

Source from the content-addressed store, hash-verified

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]

Callers

nothing calls this directly

Calls 1

from_textsMethod · 0.45

Tested by

no test coverage detected