Dateien nach "tests" hochladen
Deploy mindnet to llm-node / deploy (push) Successful in 3s

This commit is contained in:
Lars committed 2025-11-11 17:49:10 +01:00
1 parent c492f97a67
commit 487e28a904
2 files changed
+100

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
scripts/ensure_indexes_and_show.py
Erzwingt/prüft die Index-Erstellung via ensure_payload_indexes(...) und zeigt danach das payload_schema.
Aufruf:
python3 -m scripts.ensure_indexes_and_show
"""
from __future__ import annotations
import json
from app.core.qdrant import QdrantConfig, get_client, ensure_payload_indexes, collection_names
def main():
cfg = QdrantConfig.from_env()
client = get_client(cfg)
ensure_payload_indexes(client, cfg.prefix)
# Danach anzeigen
notes, chunks, edges = collection_names(cfg.prefix)
cols = [notes, chunks, edges]
res = {}
for name in cols:
info = client.get_collection(collection_name=name)
d = info.dict() if hasattr(info, "dict") else info
res[name] = d.get("result", {}).get("payload_schema")
print(json.dumps(res, ensure_ascii=False, indent=2))
if __name__ == "__main__":
main()