demeter

Autonomous Hydroponic Intelligence

agent/Qdrant/Store.py (436B)


 1from Qdrant.Client import client  # <--- FIXED IMPORT
 2from qdrant_client.models import PointStruct
 3
 4COLLECTION_NAME = "Farm_Memory"
 5
 6# client = QdrantClient(url="http://localhost:6333")
 7
 8def store_fmu(fmu):
 9    point = PointStruct(
10        id=fmu.id,
11        vector=fmu.vector,
12        payload=fmu.metadata
13    )
14
15    client.upsert(
16        collection_name=COLLECTION_NAME,
17        points=[point]
18    )
19
20    print("Stored FMU:", fmu.id)