Chroma is an AI-native open-source vector database that simplifies building LLM apps by providing tools for storing, embedding, and searching embeddings with a focus on simplicity and speed.

Usage

import os
from mem0 import Memory

os.environ["OPENAI_API_KEY"] = "sk-xx"

config = {
    "vector_store": {
        "provider": "chroma",
        "config": {
            "collection_name": "test",
            "path": "db",
        }
    }
}

m = Memory.from_config(config)
m.add("Likes to play cricket on weekends", user_id="alice", metadata={"category": "hobbies"})

Config

Here are the parameters available for configuring Chroma:

ParameterDescriptionDefault Value
collection_nameThe name of the collectionmem0
clientCustom client for ChromaNone
pathPath for the Chroma databasedb
hostThe host where the Chroma server is runningNone
portThe port where the Chroma server is runningNone