Files
buchwerk/backend/prompts.py
2026-09-27 21:36:33 +02:00

14 lines
418 B
Python

"""Prompts liegen als Markdown in prompts/, Platzhalter {{name}}."""
from . import config
def laden(name: str, **werte: str) -> str:
text = (config.PROMPTS / f"{name}.md").read_text()
for k, v in werte.items():
text = text.replace("{{" + k + "}}", v)
return text
def hinweise_block(hinweise: str) -> str:
return f"Hinweise des Auftraggebers (verbindlich): {hinweise}\n" if hinweise else ""