From 0fa4aa728039f43fa539c7f8ff6ee70ee3a41f14 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 8 Nov 2025 17:11:17 +0100 Subject: [PATCH] Dateien nach "app/core" hochladen --- app/core/chunk_payload.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/core/chunk_payload.py b/app/core/chunk_payload.py index 5676190..74e3d29 100644 --- a/app/core/chunk_payload.py +++ b/app/core/chunk_payload.py @@ -27,7 +27,19 @@ Lizenz: MIT (projektintern) """ from __future__ import annotations + +def _overlap_from_frontmatter(frontmatter: Dict[str, Any], fallback: Tuple[int,int]) -> Tuple[int,int]: + prof = str(frontmatter.get("chunk_profile") or "").strip().lower() + if prof: + try: + return profile_overlap(prof) + except Exception: + return fallback + return fallback + + from typing import Any, Dict, Iterable, List, Optional, Tuple, Union +from app.core.type_registry import profile_overlap try: # Typgerechtes Overlap aus deiner Konfiguration holen