from langchain.vectorstores import Chroma
vectorstore = Chroma.from_documents(documents=final_docs, embedding=embeddings, persist_directory=persist_dir)
how can I check the number of documents or emebddings inside vectorstore
?
from langchain.vectorstores import Chroma
vectorstore = Chroma.from_documents(documents=final_docs, embedding=embeddings, persist_directory=persist_dir)
how can I check the number of documents or emebddings inside vectorstore
?
len(vectorstore.get()['documents'])
will get you the number of documents, for instance.
Inspired by Get all documents from ChromaDb using Python and langchain