From 2cbf1c4690081e79778a620b21d9aaf8d94b88da Mon Sep 17 00:00:00 2001 From: csd4ni3l Date: Sun, 5 Oct 2025 10:03:00 +0200 Subject: [PATCH] Add maximum cap to final debt in offensive mode --- app.py | 2 +- constants.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 1396bf5..eae6e8a 100644 --- a/app.py +++ b/app.py @@ -326,7 +326,7 @@ def ai_answer(): base_prompt = OFFENSIVE_ANSWER_PROMPT if scenario_type == "offensive" else DEFENSIVE_ANSWER_PROMPT - while not re.findall(evaluation_regex, text): + while not re.findall(evaluation_regex, text) or int(text.split("Final Debt Amount: ")[1].split("$")[0]) > 1000000: text = ai_prompt(base_prompt.format_map({"scenario": scenario, "user_input": user_input, "ai_name": AI_NAME, "debt_amount": debt_amount})) time.sleep(0.5) diff --git a/constants.py b/constants.py index cc4ab10..2af14bb 100644 --- a/constants.py +++ b/constants.py @@ -66,7 +66,7 @@ Final Debt Amount: [Integer >= Original Debt if Yes, or 0$ if No] **STRICTLY ONLY REPLY IN THE REPLY FORMAT MENTIONED ABOVE. NO EXCEPTIONS.** For 'Convinced', reply only as **Yes** or **No**. -For 'Final Debt Amount', reply only as an integer immediately followed by `$`. +For 'Final Debt Amount', reply only as an integer immediately followed by `$`. The 'Final Debt Amount' CAN'T EXCEED 1000000$. * If **Convinced: Yes**, the amount must be **>=** {debt_amount}. * If **Convinced: No**, the amount **MUST** be **0$**. """