mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

graph memory

Open eyesspace opened this issue 9 months ago • 1 comments

🐛 Describe the bug

mem0: 0.1.75 ollama: 0.5.1

import os
import sys

from mem0 import Memory

client = Memory.from_config(
    {
        "llm": {
            "provider": "ollama",
            "config": {
                "model": "qwen2.5:latest",
                "temperature": 0.2,
                "max_tokens": 2000,
                "api_key": "xxxxxx",
                "ollama_base_url": "http://10.10.10.249:11434",
            },
        },
        "vector_store": {
            "provider": "chroma",
            "config": {"collection_name": "smart_temrinal_mem", "path": "data/vector"},
        },
        "graph_store": {
            "provider": "neo4j",
            "config": {
                "url": "bolt://10.10.10.249:7687",
                "username": "neo4j",
                "password": "pwd_neo4j_01~!",
            },
            "llm": {
                "provider": "ollama",
                "config": {"model": "qwen2.5:latest", "temperature": 0.0},
            },
        },
        "embedder": {
            "provider": "ollama",
            "config": {
                "model": "nomic-embed-text:latest",
                "ollama_base_url": "http://10.10.10.249:11434",
            },
        },
        "history_db_path": "data/history.db",
    }
)

memories_to_add = [
    ("I recently started a new job as a software engineer", {"category": "career"}),
    ("I traveled to Japan last year for vacation", {"category": "travel"}),
    ("I bought a new bicycle to stay active", {"category": "fitness"}),
    ("My favorite dish is lasagna", {"category": "food"}),
    ("I have a pet dog named Bruno", {"category": "personal"}),
]

for memory, meta in memories_to_add:
    client.add(memory, user_id="test", metadata=meta)

Image

eyesspace avatar Mar 25 '25 04:03 eyesspace

Image

eyesspace avatar Mar 25 '25 05:03 eyesspace

Any updates? Indeed, I faced the same issues with memgraph

NukeBird avatar Jul 25 '25 10:07 NukeBird

Thanks for reaching out, Closing this issue as this was fixed with the new release. Can you try updating the mem0ai package and see if it works? Thanks

parshvadaftari avatar Oct 02 '25 19:10 parshvadaftari