Supported Vector Databases
Chroma
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:
Parameter | Description | Default Value |
---|---|---|
collection_name | The name of the collection | mem0 |
client | Custom client for Chroma | None |
path | Path for the Chroma database | db |
host | The host where the Chroma server is running | None |
port | The port where the Chroma server is running | None |