Ah you're right. I tried that before, but there was something wrong in my code. Since I'm using custom persist folders for both chroma and storageContext, I had to specify that folder
everywhere. Thanks! Here's the final code:
chroma_client = chromadb.Client(Settings(
chroma_db_impl="duckdb+parquet",
persist_directory=persist_dir
))
chroma_collection = chroma_client.get_collection("test")
vector_store = ChromaVectorStore(chroma_collection=chroma_collection)
storage_context = StorageContext.from_defaults(vector_store=vector_store, persist_dir=persist_dir)
index = load_index_from_storage(storage_context, service_context = service_context)
Still, I don't know why I would use this instead of the default llama_index storage. I was checking if it improved query response times, but it didn't.