Stop DM from re-asking setup questions already answered in the wizard
run_dm_turn now loads the game's name/description into the system prompt on every turn, and the Session-0 instructions tell the DM to check those framing details first and skip re-asking genre/world, scope, or experience level when they're already covered there — only the still-open points (player count, characters, rule-depth preference, content boundaries) get asked. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ from app.config import settings
|
||||
from app.llm.client import get_dm_system_prompt, get_llm_client
|
||||
from app.llm.context import build_context
|
||||
from app.llm.tools import character_sheet, dice
|
||||
from app.models.game import Game
|
||||
from app.models.message import Message
|
||||
from app.rag.retrieval import build_rag_block
|
||||
|
||||
@@ -45,6 +46,15 @@ async def run_dm_turn(
|
||||
client = get_llm_client()
|
||||
system_prompt = get_dm_system_prompt()
|
||||
|
||||
game = await session.get(Game, game_id)
|
||||
if game is not None:
|
||||
system_prompt = (
|
||||
f"{system_prompt}\n\n"
|
||||
"Spiel-Rahmendaten (vom Ersteller beim Anlegen bereits festgelegt — NICHT erneut "
|
||||
"abfragen, in Session 0 höchstens knapp bestätigen):\n"
|
||||
f"Name: {game.name}\nBeschreibung: {game.description}"
|
||||
)
|
||||
|
||||
if latest_player_message:
|
||||
rag_block = await build_rag_block(session, latest_player_message)
|
||||
if rag_block:
|
||||
|
||||
Reference in New Issue
Block a user