blob: 66ee410cf5d872916cfc39c2f27fa5b65ef45bfe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env python3
# This functions don't necessarily stand alone. I used on debug process
import uuid
response = collection.query(
query_texts="machines scale",
where={"node-id": "496d4874-be24-4601-8a87-214d55e11297"},
)
collection.query(query_texts="machines scale")
def get_node(node_id):
return collection.get(where={"node-id": node_id})
def get_data(amount):
nodeid = str(uuid.uuid4())
data = ["heelo" for _ in range(amount)]
metadata = [{"node-id": nodeid, "point": i} for i in range(amount)]
ids = [str(uuid.uuid4()) for _ in range(amount)]
return {"documents": data, "metadatas": metadata, "ids": ids}
|