llm-api/plan_router.py aktualisiert
All checks were successful
Deploy Trainer_LLM to llm-node / deploy (push) Successful in 1s
All checks were successful
Deploy Trainer_LLM to llm-node / deploy (push) Successful in 1s
This commit is contained in:
parent
d9eefcb1fa
commit
9fd41ce3f0
|
|
@ -325,10 +325,16 @@ def create_plan(p: Plan):
|
||||||
if isinstance(payload.get("created_at"), datetime):
|
if isinstance(payload.get("created_at"), datetime):
|
||||||
payload["created_at"] = payload["created_at"].astimezone(timezone.utc).isoformat()
|
payload["created_at"] = payload["created_at"].astimezone(timezone.utc).isoformat()
|
||||||
# Materialisierte Section-Namen für robuste Filter/Indizes
|
# Materialisierte Section-Namen für robuste Filter/Indizes
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
payload["plan_section_names"] = _norm_list([s.get("name", "") for s in (payload.get("sections") or [])])
|
payload["plan_section_names"] = _norm_list([s.get("name", "") for s in (payload.get("sections") or [])])
|
||||||
except Exception:
|
except Exception:
|
||||||
payload["plan_section_names"] = _norm_list([s.name for s in (p.sections or [])])
|
payload["plan_section_names"] = _norm_list([s.name for s in (p.sections or [])])
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
payload["plan_section_names"] = sorted({ (s.get("name") or "").strip() for s in (payload.get("sections") or []) if s.get("name") })
|
||||||
|
except Exception:
|
||||||
|
payload["plan_section_names"] = sorted({ (s.name or "").strip() for s in (p.sections or []) if getattr(s, "name", None) })
|
||||||
|
|
||||||
vec = _embed(_plan_embed_text(p))
|
vec = _embed(_plan_embed_text(p))
|
||||||
qdrant.upsert(collection_name=PLAN_COLLECTION, points=[PointStruct(id=str(p.id), vector=vec, payload=payload)])
|
qdrant.upsert(collection_name=PLAN_COLLECTION, points=[PointStruct(id=str(p.id), vector=vec, payload=payload)])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user