app/core/qdrant_points.py aktualisiert
Some checks failed
Deploy mindnet to llm-node / deploy (push) Failing after 2s

This commit is contained in:
Lars 2025-09-04 08:25:34 +02:00
parent bd45abd781
commit 379cb6ff99

View File

@ -56,8 +56,8 @@ def points_for_chunks(
def points_for_edges(prefix: str, edge_payloads: List[dict]) -> Tuple[str, List[rest.PointStruct]]:
"""
Edges-Collection ohne Vektor.
Robustheit:
- Fehlt 'edge_id', dann konstruiere aus (kind, source_id, target_id, seq) eine stabile ID.
- Pydantic/Qdrant-Client erwartet trotzdem ein 'vector'-Feld wir setzen vector=None.
- Fehlt 'edge_id', konstruieren wir eine stabile ID aus (kind, source_id, target_id, seq).
"""
_, _, edges_col = _names(prefix)
points: List[rest.PointStruct] = []
@ -71,10 +71,12 @@ def points_for_edges(prefix: str, edge_payloads: List[dict]) -> Tuple[str, List[
edge_id = f"{kind}:{s}->{t}#{seq}"
pl["edge_id"] = edge_id
point_id = _to_uuid(edge_id)
points.append(rest.PointStruct(id=point_id, payload=pl))
# WICHTIG: vector=None, damit der Client das Feld hat, die Collection aber vektorlos bleibt
points.append(rest.PointStruct(id=point_id, vector=None, payload=pl))
return edges_col, points
def upsert_batch(client, collection: str, points: List[rest.PointStruct]) -> None:
if not points:
return