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.

The app loads .env from the repository root at runtime using python-dotenv. The real .env is intentionally ignored by Git.

Environment variables

VariableRequiredPurpose
OPENAI_API_KEYYes for model responsesOpenAI API key used by services/chat_service.py
OPENAI_MODELNoDefaults to gpt-4o-mini in the model call
ALLOWED_ORIGINSYesComma-separated CORS allowlist
LOG_LEVELNoPython logging level, for example INFO
RESPONSE_CACHE_TTL_SECONDSNoIn-memory answer cache TTL
RESPONSE_CACHE_MAX_ITEMSNoMax in-memory cached answer count
ADMIN_TOKENYes for /admin/...Token for protected admin endpoints
ANALYTICS_ENABLEDNoEnables local JSONL analytics unless set to false
OPENAI_API_KEY=sk-your-openai-api-key
OPENAI_MODEL=gpt-4o-mini
ALLOWED_ORIGINS=http://127.0.0.1:8000,http://localhost:8000
LOG_LEVEL=INFO
RESPONSE_CACHE_TTL_SECONDS=3600
RESPONSE_CACHE_MAX_ITEMS=200
ADMIN_TOKEN=change-me
ANALYTICS_ENABLED=true

Guardrails in config

core/config.py treats placeholder values as unconfigured:
def openai_api_key() -> str:
    key = os.getenv("OPENAI_API_KEY", "").strip()
    if not key or key in {"sk-your-openai-api-key", "your-openai-api-key"}:
        return ""
    return key
The admin token has the same safety shape:
def admin_token() -> str:
    token = os.getenv("ADMIN_TOKEN", "").strip()
    if not token or token in {"change-me", "your-admin-token"}:
        return ""
    return token
Never paste real .env values into issues, docs, screenshots, or chat messages. If a key is exposed, rotate it immediately.