Add maximum cap to final debt in offensive mode

This commit is contained in:
csd4ni3l
2025-10-05 10:03:00 +02:00
parent 32729c5257
commit 2cbf1c4690
2 changed files with 2 additions and 2 deletions

2
app.py
View File

@@ -326,7 +326,7 @@ def ai_answer():
base_prompt = OFFENSIVE_ANSWER_PROMPT if scenario_type == "offensive" else DEFENSIVE_ANSWER_PROMPT 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})) 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) time.sleep(0.5)

View File

@@ -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.** **STRICTLY ONLY REPLY IN THE REPLY FORMAT MENTIONED ABOVE. NO EXCEPTIONS.**
For 'Convinced', reply only as **Yes** or **No**. 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: Yes**, the amount must be **>=** {debt_amount}.
* If **Convinced: No**, the amount **MUST** be **0$**. * If **Convinced: No**, the amount **MUST** be **0$**.
""" """