From 36658f12fe50149f084e3359bb6ae0f688de84f3 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 8 Nov 2025 18:02:15 +0100 Subject: [PATCH] Dateien nach "scripts" hochladen --- scripts/import_markdown.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scripts/import_markdown.py b/scripts/import_markdown.py index 10869b3..b9a4586 100644 --- a/scripts/import_markdown.py +++ b/scripts/import_markdown.py @@ -4,6 +4,27 @@ Script: scripts/import_markdown.py — Markdown → Qdrant (Notes, Chunks, Edges) Version: 3.7.2 Datum: 2025-09-30 +# ---- helpers ---- +def effective_chunk_profile(note_type: str, registry: dict) -> str | None: + try: + tcfg = (registry or {}).get("types", {}).get(note_type) or (registry or {}).get("types", {}).get("concept") + prof = (tcfg or {}).get("chunk_profile") + if isinstance(prof, str) and prof in {"short", "medium", "long"}: + return prof + except Exception: + pass + return None + +def effective_retriever_weight(note_type: str, registry: dict) -> float | None: + try: + tcfg = (registry or {}).get("types", {}).get(note_type) or (registry or {}).get("types", {}).get("concept") + w = (tcfg or {}).get("retriever_weight") + if w is None: + return None + return float(w) + except Exception: + return None + Kurzbeschreibung ----------------