chroma_client = chromadb.PersistentClient(path="chroma") chroma_collection = chroma_client.get_or_create_collection("cardcom_collection") vector_store = ChromaVectorStore(chroma_collection=chroma_collection) storage_context = StorageContext.from_defaults(vector_store=vector_store) index = VectorStoreIndex.from_documents(documents, storage_context=storage_context, service_context=service_context)
chroma_client = chromadb.PersistentClient(path="chroma") chroma_collection = chroma_client.get_or_create_collection("cardcom_collection") vector_store = ChromaVectorStore(chroma_collection=chroma_collection) index = VectorStoreIndex.from_vector_store(vector_store, service_context=service_context)