This commit is contained in:
1 parent
f0e675ffd8
commit
36658f12fe
1 file changed
+21
@@ -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
|
||||
----------------
|
||||
|
||||
Reference in new issue
Block a user