INNER CODE UNIT · Python
loader
junruxiong/IncarnaMind · docs2db.py:88
loader = loader_type(file_path, **args)
doc = loader.load()
return doc
raise ValueError(f"Extension {ext} not supported")
def docs2vectorstore(docs: List[Document], embedding_name: str, suffix: str = ""):
"""Convert a list of Documents into a Chroma vector store.
Args:
docs (Document): The list of Documents.
suffix (str, optional): Suffix for the embedding. Defaults to "".
"""
embedding = choose_embeddings(embedding_name)
name = f"{embedding_name}_{suffix}"
# if embedding_store_path is not existing, create it