demeter
Autonomous Hydroponic Intelligencegit clone https://github.com/maydayv7/demeter
agent/tools/reset_memory.py (611B)
1import os
2from dotenv import load_dotenv
3from qdrant_client import QdrantClient
4
5load_dotenv()
6
7# 1. Connect to Qdrant directly
8client = QdrantClient(
9 url=os.getenv("QDRANT_URL"),
10 api_key=os.getenv("QDRANT_API_KEY"),
11)
12
13collection_name = "plant_biographies"
14
15# 2. Check and Delete
16if client.collection_exists(collection_name):
17 print(f"🗑️ Deleting mismatched collection: {collection_name}...")
18 client.delete_collection(collection_name)
19 print("✅ Collection deleted. Restart your main script now!")
20else:
21 print(f"⚠️ Collection {collection_name} not found. You are good to go.")