#!/usr/bin/env python3 import os import sys # Add parent dir to path so we can import GramAddict sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) from GramAddict.core.qdrant_memory import UIMemoryDB def wipe_qdrant(): print("๐Ÿงน Initializing Qdrant connection...") memory = UIMemoryDB() if not memory.is_connected: print("โŒ Qdrant is not connected. Make sure the container is running.") sys.exit(1) print(f"โš ๏ธ Wiping collection: {memory.COLLECTION_NAME}") try: memory.client.delete_collection(collection_name=memory.COLLECTION_NAME) print("โœ… Collection deleted.") # Reinitialize to recreate the schema memory._init_collection() print("โœ… Collection recreated with clean schema.") print("๐ŸŽ‰ Qdrant Memory is now completely clean and ready for fresh learning!") except Exception as e: print(f"โŒ Failed to wipe Qdrant memory: {e}") sys.exit(1) if __name__ == "__main__": wipe_qdrant()