Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs-chat.die-coaching-akademie.de/llms.txt

Use this file to discover all available pages before exploring further.

Module reference

PathResponsibility
app.pyFastAPI app, public routes, admin routes, static files, analytics hook
models.pyPydantic models for chat, history, state, and health responses
core/config.pyPaths, environment helpers, system prompt, constants
services/chat_service.pyChat answer logic, knowledge-base search, deterministic rules, OpenAI calls
services/analytics_service.pyJSONL analytics, scrubbing, summaries
sync_website_content.pyWebsite content sync into data/website_knowledge_base.json
static/chatbot.jsEmbeddable widget behavior
static/chatbot.cssWidget styling
templates/admin_dashboard.htmlProtected admin dashboard page

Change guidance

Prefer services/chat_service.py. Keep app.py as the HTTP entrypoint and add focused regression tests in tests/test_app.py.
Prefer data/knowledge_base.json for curated content. Use data/CONTENT_GUIDE.md for field expectations.
Use static/chatbot.js for behavior and static/chatbot.css for styling. The customer site only embeds the script.
Use services/analytics_service.py for stored event shape and summary functions. Keep privacy constraints intact.

Example: deterministic answer order

answer_chat currently tries deterministic handlers before OpenAI:
for response in (
    build_payment_terms_response(payload.message),
    build_price_response(payload.message),
    build_infoabend_response(payload.message),
):
    if response:
        store_cached_response(payload.message, response, payload.history)
        return response
This order matters because known high-risk topics like payment and price should not be improvised by the model.