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>
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
database_url: str = "postgresql+asyncpg://dnd:changeme@postgres:5432/dnd"
|
|
|
|
# "xai" (default, cloud) or "lmstudio" (local, OpenAI-compatible server)
|
|
llm_provider: str = "xai"
|
|
|
|
xai_api_key: str = ""
|
|
xai_base_url: str = "https://api.x.ai/v1"
|
|
dm_model: str = "grok-4.6"
|
|
|
|
# host.docker.internal, not a LAN IP — the backend runs inside Docker Desktop's own
|
|
# network namespace, which can reach the Windows host via this name but not necessarily
|
|
# via whatever IP the host itself sees for the machine (e.g. a WSL2-internal address).
|
|
lmstudio_base_url: str = "http://host.docker.internal:1234/v1"
|
|
lmstudio_api_key: str = ""
|
|
|
|
jwt_secret: str = "dev-insecure-secret-change-me"
|
|
reset_password_secret: str = "dev-insecure-secret-change-me"
|
|
verification_token_secret: str = "dev-insecure-secret-change-me"
|
|
|
|
smtp_host: str = ""
|
|
smtp_port: int = 587
|
|
smtp_user: str = ""
|
|
smtp_password: str = ""
|
|
smtp_from: str = "no-reply@dungeonsdragons.tstratmann.de"
|
|
|
|
frontend_origin: str = "http://localhost:5173"
|
|
|
|
|
|
settings = Settings()
|