with weaviate.connect_to_local(host=host, port=port) as client:
while not client.is_ready():
pass
if not client.collections.exists("KnowledgeBase"):
schema = json.load(open("vector_db.json"))
client.collections.create_from_dict(schema)
if not client.collections.exists("ProductList") and os.path.exists("db.json"):
schema = json.load(open("db.json"))
client.collections.create_from_dict(schema)
This should be fixed