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

This commit is contained in:
Lars committed 2025-11-16 17:36:09 +01:00
1 parent 2e7c497b69
commit eafa0fad85
2 files changed
+36 -55

No files matched your search

+7 -11
View File
@@ -1,11 +1,9 @@
#!/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
tests/ensure_indexes_and_show.py (v1.0)
Alias für die Test-Suite: ruft ensure_payload_indexes(...) auf
und zeigt danach das payload_schema (mit with_payload_schema=True).
"""
from __future__ import annotations
import json
@@ -15,14 +13,12 @@ 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")
for name in (notes, chunks, edges):
info = client.get_collection(collection_name=name, with_payload_schema=True)
d = info.model_dump() if hasattr(info, "model_dump") else (info.dict() if hasattr(info, "dict") else info)
res[name] = (d.get("result") or {}).get("payload_schema")
print(json.dumps(res, ensure_ascii=False, indent=2))
if __name__ == "__main__":