init
This commit is contained in:
13
backend/prompts.py
Normal file
13
backend/prompts.py
Normal file
@@ -0,0 +1,13 @@
|
||||
"""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 ""
|
||||
Reference in New Issue
Block a user