Find answers from the community

Updated 2 months ago

I'm wondering what happened to GPTChromaIndex? was it renamed?

I'm wondering what happened to GPTChromaIndex? was it renamed?
k
L
3 comments
Please stand by @Brainstencil as I search the knowledge base. We are experiencing especially high traffic right now and might take longer than usual. :wave:
----------------------
Yes, it seems that GPTChromaIndex has been renamed to GPTVectorStoreIndex with ChromaVectorStore. You can find an example of creating a Chroma Index in the ChromaIndexDemo (https://gpt-index.readthedocs.io/en/latest/examples/vector_stores/ChromaIndexDemo.html) documentation.

Here's a code snippet from the extracts on how to create a GPTVectorStoreIndex with ChromaVectorStore:

Plain Text
from llama_index import GPTVectorStoreIndex, SimpleDirectoryReader
from llama_index.vector_stores import ChromaVectorStore
from IPython.display import Markdown, display

# load documents
documents = SimpleDirectoryReader('../paul_graham_essay/data').load_data()

from llama_index.storage.storage_context import StorageContext

vector_store = ChromaVectorStore(chroma_collection=chroma_collection)
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = GPTVectorStoreIndex.from_documents(documents, storage_context=storage_context)


This code demonstrates how to create a GPTVectorStoreIndex using the ChromaVectorStore for storing document vectors.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Yea there's one vector index, and you set the backend vector store in its storage context now πŸ‘
Add a reply
Sign up and join the conversation on Discord