624644619c
- Character sheets gain structured combat_stats, abilities (name + plain-language explanation), and equipment fields, populated by the upsert_character_sheet tool; the detail page renders them as their own sections instead of one prose block, with a player-card-style attribute grid (full ability names + modifiers). - Fix double-escaped unicode occasionally left in tool-call JSON arguments (a model quirk) and stop the app's own json.dumps calls from re-introducing it (ensure_ascii=False). - Render chat messages as markdown (react-markdown + Tailwind typography) instead of raw text, and widen the games/characters/ chat layout to use more of the screen on desktop. - Sharpen the DM system prompt: state the ability + DC for each offered action option before the player commits, and narrate rolls as DC → result → pass/fail before the story consequence; also stop re-asking Session-0 questions already answered in the game's name/description. - Make the DM's LLM provider configurable (xai default, lmstudio for a local OpenAI-compatible server via host.docker.internal) instead of hardcoded to x.ai. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
38 lines
1.3 KiB
Bash
38 lines
1.3 KiB
Bash
# Copy this file to .env and fill in real values. Never commit .env.
|
|
|
|
# DM model provider: "xai" (default, cloud) or "lmstudio" (local, free, no API cost)
|
|
LLM_PROVIDER=xai
|
|
|
|
# x.ai API (Grok) — used when LLM_PROVIDER=xai. Get a key at https://console.x.ai
|
|
XAI_API_KEY=
|
|
DM_MODEL=grok-4.6
|
|
|
|
# LM Studio local server — used when LLM_PROVIDER=lmstudio. Use host.docker.internal, not a
|
|
# LAN IP — the backend runs inside Docker and can't necessarily reach the host's LAN address
|
|
# (e.g. a WSL2-internal IP the host itself sees but containers can't route to).
|
|
LMSTUDIO_BASE_URL=http://host.docker.internal:1234/v1
|
|
LMSTUDIO_API_KEY=
|
|
# When LLM_PROVIDER=lmstudio, also set DM_MODEL above to the model id LM Studio reports at
|
|
# GET /v1/models, e.g. DM_MODEL=qwen2.5-14b-instruct
|
|
|
|
# Auth secrets — generate with: python -c "import secrets; print(secrets.token_urlsafe(32))"
|
|
JWT_SECRET=
|
|
RESET_PASSWORD_SECRET=
|
|
VERIFICATION_TOKEN_SECRET=
|
|
|
|
# Postgres
|
|
POSTGRES_USER=dnd
|
|
POSTGRES_PASSWORD=
|
|
POSTGRES_DB=dnd
|
|
DATABASE_URL=postgresql+asyncpg://dnd:changeme@postgres:5432/dnd
|
|
|
|
# SMTP (password reset emails). Leave empty in dev — emails are logged to console instead.
|
|
SMTP_HOST=
|
|
SMTP_PORT=587
|
|
SMTP_USER=
|
|
SMTP_PASSWORD=
|
|
SMTP_FROM=no-reply@dungeonsdragons.tstratmann.de
|
|
|
|
# Frontend / CORS
|
|
FRONTEND_ORIGIN=http://localhost:5173
|