| 12345678910111213141516 |
- # reset_memory.py
- import sys
- import requests
- base = "http://192.168.0.200:8001/api/v1"
- mem0_base = "http://192.168.0.200:8420"
- name = sys.argv[1]
- requests.delete(f"{base}/collections/{name}")
- requests.post(f"{base}/collections", json={"name": name})
- print(f"collection reset: {name}")
- # Bounce the mem0 server so it re-acquires the fresh collection
- import subprocess
- subprocess.run(["docker", "compose", "restart", "mem0server"])
- print("mem0server restarted")
|