DAMHelper / prompts /prompts_manager.py
enricorampazzo's picture
first E2E working implementation
0fadcb9
raw
history blame
849 Bytes
import datetime
from pathlib import Path
from utils.date_utils import get_today_date_as_dd_mm_yyyy
class PromptsManager:
def __init__(self):
base_path = Path(__file__, "..")
with open(Path(base_path, "system_prompt.txt")) as sysprompt_file:
self.system_prompt: str = sysprompt_file.read()
with open(Path(base_path, "questions.txt")) as questions_file:
self.questions: list[str] = questions_file.readlines()
with open(Path(base_path, "verification_prompt2.txt")) as verification_prompt_file:
verification_prompt = verification_prompt_file.readlines()
todays_date = get_today_date_as_dd_mm_yyyy()
for line in verification_prompt:
line.replace("{today}", todays_date)
self.verification_prompt: list[str] = verification_prompt