payload durchreichen bis zum chat
This commit is contained in:
1 parent
bd36d78025
commit
2310633de3
3 files changed
+17
-10
No files matched your search
+6
-2
@@ -76,7 +76,11 @@ def _build_enriched_context(hits: List[QueryHit]) -> str:
|
||||
"[Kein Text]"
|
||||
)
|
||||
title = hit.note_id or "Unbekannt"
|
||||
note_type = source.get("type", "unknown").upper()
|
||||
|
||||
# FIX: Wir holen den Typ aus Payload oder Source (Fallback)
|
||||
payload = hit.payload or {}
|
||||
note_type = payload.get("type") or source.get("type", "unknown")
|
||||
note_type = str(note_type).upper()
|
||||
|
||||
entry = (
|
||||
f"### QUELLE {i}: {title}\n"
|
||||
@@ -214,7 +218,7 @@ async def chat_endpoint(
|
||||
sources=hits,
|
||||
latency_ms=duration_ms,
|
||||
intent=intent,
|
||||
intent_source=intent_source # NEU: Source durchreichen
|
||||
intent_source=intent_source # Source durchreichen
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in new issue
Block a user