Dateien nach "scripts" hochladen
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 3s

This commit is contained in:
Lars 2025-11-08 17:55:56 +01:00
parent 70b3169e7f
commit 1729e0b40d

View File

@ -97,24 +97,6 @@ try:
except Exception:
embed_texts = None
# --- Type Registry (optional) -----------------------------------------------
try:
from app.core.type_registry import (
load_type_registry,
resolve_note_type,
get_type_config,
effective_chunk_profile,
)
except Exception: # registry optional; provide safe fallbacks
def load_type_registry(path: str = "config/types.yaml") -> dict: # type: ignore
return {}
def resolve_note_type(t, reg): # type: ignore
return (t or "concept")
def get_type_config(note_type, reg): # type: ignore
return {}
def effective_chunk_profile(note_type, reg): # type: ignore
return None
# ---------------------------------------------------------------------
# Helper
@ -266,9 +248,6 @@ def main() -> None:
ensure_collections(client, cfg.prefix, cfg.dim)
ensure_payload_indexes(client, cfg.prefix)
# Load Type-Registry once (optional)
reg = load_type_registry()
root = os.path.abspath(args.vault)
# Dateiliste bestimmen
@ -393,6 +372,18 @@ def main() -> None:
if weight is not None:
fm["retriever_weight"] = float(weight)
# Ensure note-level payload reflects registry fields
try:
if isinstance(note_pl, dict):
if fm.get("type"):
note_pl["type"] = fm["type"]
if fm.get("chunk_profile"):
note_pl["chunk_profile"] = fm["chunk_profile"]
if "retriever_weight" in fm:
note_pl["retriever_weight"] = fm["retriever_weight"]
except Exception:
pass
chunks = assemble_chunks(fm["id"], body_text, fm.get("type", "concept"))
chunk_pls = make_chunk_payloads(fm, note_pl["path"], chunks, note_text=body_text)
except Exception as e: