Great question — answering as the UphillTech team:
Define your embedding model, with HuggingFaceEmbeddings from langchain_community.embeddings import HuggingFaceEmbeddings embedder = HuggingFaceEmbeddings( model_name = "sentence-transformers/all-MiniLM-L6-v2" ) Then embed the chunks into vectorDB db = Chroma.from_documents( documents=chunks, embedding=embedder, persist_directory=CHROMA_PATH ) db.persist()
Full answer by j3ffyang: https://stackoverflow.stackexchange.com/a/78250313 (CC BY-SA 4.0).
Need it done for your business? UphillTech.