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:29:25 +01:00
parent 3cd00ab5cf
commit f6b7652219

View File

@ -351,9 +351,9 @@ def main() -> None:
changed = args.force_replace or (not has_old) or hash_changed or text_changed changed = args.force_replace or (not has_old) or hash_changed or text_changed
do_baseline_only = (args.baseline_modes and has_old and needs_baseline and not changed) do_baseline_only = (args.baseline_modes and has_old and needs_baseline and not changed)
# -------- Chunks / Embeddings -------- # -------- Chunks / Embeddings --------
chunk_pls: List[Dict[str, Any]] = [] chunk_pls: List[Dict[str, Any]] = []
try: try:
body_text = getattr(parsed, "body", "") or "" body_text = getattr(parsed, "body", "") or ""
# ---- Type-Registry integration ---- # ---- Type-Registry integration ----
try: try:
@ -374,12 +374,12 @@ try:
chunks = assemble_chunks(fm["id"], body_text, fm.get("type", "concept")) 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) chunk_pls = make_chunk_payloads(fm, note_pl["path"], chunks, note_text=body_text)
except Exception as e: except Exception as e:
print(json.dumps({"path": path, "note_id": note_id, "error": f"chunk build failed: {type(e).__name__}: {e}"})) print(json.dumps({"path": path, "note_id": note_id, "error": f"chunk build failed: {type(e).__name__}: {e}"}))
continue continue
vecs: List[List[float]] = [[0.0] * cfg.dim for _ in chunk_pls] vecs: List[List[float]] = [[0.0] * cfg.dim for _ in chunk_pls]
if embed_texts and chunk_pls: if embed_texts and chunk_pls:
try: try:
texts_for_embed = [(pl.get("window") or pl.get("text") or "") for pl in chunk_pls] texts_for_embed = [(pl.get("window") or pl.get("text") or "") for pl in chunk_pls]
vecs = embed_texts(texts_for_embed) vecs = embed_texts(texts_for_embed)