Qdrant is an open-source vector search engine. It is designed to work with large-scale datasets and provides a high-performance search engine for vector data.

Usage

import os
from mem0 import Memory

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

config = {
    "vector_store": {
        "provider": "qdrant",
        "config": {
            "collection_name": "test",
            "host": "localhost",
            "port": 6333,
        }
    }
}

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

Config

Let’s see the available parameters for the qdrant config:

ParameterDescriptionDefault Value
collection_nameThe name of the collection to store the vectorsmem0
embedding_model_dimsDimensions of the embedding model1536
clientCustom client for qdrantNone
hostThe host where the qdrant server is runningNone
portThe port where the qdrant server is runningNone
pathPath for the qdrant database/tmp/qdrant
urlFull URL for the qdrant serverNone
api_keyAPI key for the qdrant serverNone
on_diskFor enabling persistent storageFalse