Find answers from the community

Updated 2 months ago

```py

Plain Text
# Create in-memory ChromaDB client
    chroma_name = (
        f"analysis_{datetime.datetime.now().strftime('%Y%m%d_%H%M%S')}"
    )
    print(f"Chroma collection name: {chroma_name}")
    chroma_client = chromadb.EphemeralClient()
    chroma_collection = chroma_client.get_or_create_collection(chroma_name)
    # Create ChromaVectorStore
    print(f"Creating ChromaVectorStore for collection: {chroma_name}")
    vector_store = ChromaVectorStore(
        collection_name=chroma_name, chroma_collection=chroma_collection
    )
    print(
        f"ChromaVectorStore created from collection: {vector_store.collection_name}"
    )


I can't get Chroma DB to work here, An error occurred: 'Collection' object has no attribute 'model_fields
W
Z
4 comments
Can you check if your chroma package is up to dated or not?
pip install llama-index-vector-stores-chroma
And then try again. I have never faced this error.
yeah I've ran this a few times
I'm just trying to follow along the video analysis one, I swapped the Lance DB for Chroma, and then removed it and went with just a multi-modal vector store index, which is still giving me errors about Cannot build index from nodes with no content, which is also bullcrap
Attachment
image.png
Add a reply
Sign up and join the conversation on Discord