faq-trigger: auch in /api/chat (Website-Chat) einbauen

This commit is contained in:
Hermes Agent
2026-06-19 17:37:03 +02:00
parent 99a5a8975f
commit ffff6d1fa3
+15
View File
@@ -3573,6 +3573,21 @@ def api_chat():
if not user_message:
return jsonify({'reply': 'Leere Nachricht. Was möchtest du wissen?'})
# ── FAQ-Trigger: "Keine Antwort" / "Warum keine Nachricht" ──────
faq_keywords = [
"keine antwort", "bekomme keine", "keine nachricht",
"antwort kommt nicht", "warum keine", "keine rückmeldung",
"why no reply", "not receiving", "save contact", "nummer speichern"
]
if any(kw in user_message.lower() for kw in faq_keywords):
return jsonify({'reply': (
"💡 *Tipp:* Damit unsere Antworten bei dir ankommen, "
"speichere bitte unsere Nummer in deinem Adressbuch. "
"WhatsApp filtert Nachrichten von unbekannten Business-Accounts "
"auf manchen Handys leider automatisch heraus.\n\n"
"Sobald du uns als Kontakt gespeichert hast, klappt's! ✅"
)})
# Build context from published submissions
rows = db.execute(
"SELECT id, halle, content, summary, type, sender_name, category, "