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:36:50 +02:00
parent 379cb6ff99
commit 3dcc9274fc

View File

@ -55,9 +55,9 @@ def points_for_chunks(
def points_for_edges(prefix: str, edge_payloads: List[dict]) -> Tuple[str, List[rest.PointStruct]]:
"""
Edges-Collection ohne Vektor.
- Pydantic/Qdrant-Client erwartet trotzdem ein 'vector'-Feld wir setzen vector=None.
Edges-Collection mit 1D-Dummy-Vektor.
- Fehlt 'edge_id', konstruieren wir eine stabile ID aus (kind, source_id, target_id, seq).
- vector=[0.0] erfüllt die Client-Validierung.
"""
_, _, edges_col = _names(prefix)
points: List[rest.PointStruct] = []
@ -71,12 +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)
# 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))
points.append(rest.PointStruct(id=point_id, vector=[0.0], payload=pl))
return edges_col, points
def upsert_batch(client, collection: str, points: List[rest.PointStruct]) -> None:
if not points:
return