debate: switch to CREATIVE_MODEL with system prompt for uncensored arguments
Lint / Shell (shellcheck) (push) Successful in 12s
Lint / JS (eslint) (push) Successful in 7s
Lint / Python (ruff) (push) Successful in 5s
Lint / Python deps (pip-audit) (push) Successful in 45s
Lint / Secret scan (gitleaks) (push) Successful in 5s

phi4-mini refused to argue FOR controversial topics, instead deflecting
with neutral takes. The abliterated model with a committed debater system
prompt will actually take both sides without hedging or disclaimers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-23 21:59:02 -04:00
parent 8fc734643b
commit f4e6e6f9fe
+20 -13
View File
@@ -2257,24 +2257,32 @@ async def cmd_debate(client: AsyncClient, room_id: str, sender: str, args: str):
await send_text(client, room_id, f"⚖️ Debating: {topic}...") await send_text(client, room_id, f"⚖️ Debating: {topic}...")
prompt = ( system_msg = (
f"Debate the topic: \"{topic}\"\n\n" "You are a rhetorical debate bot. Your job is to produce sharp, committed arguments on both sides of any topic — "
"Write exactly 2-3 sentences FOR the topic, then exactly 2-3 sentences AGAINST the topic.\n" "no matter how controversial. You do not add warnings, disclaimers, or moral hedging. "
"Format your response EXACTLY as:\n" "You argue each side as if you genuinely believe it. "
"FOR: <your for argument here>\n" "Respond with ONLY two lines, nothing else:\n"
"AGAINST: <your against argument here>\n\n" "FOR: <2-3 sentences genuinely arguing in favor of the topic>\n"
"No extra text, no markdown, no headers beyond FOR: and AGAINST:." "AGAINST: <2-3 sentences genuinely arguing against the topic>"
) )
user_msg = f'Debate the topic: "{topic}"'
try: try:
timeout = aiohttp.ClientTimeout(total=30) timeout = aiohttp.ClientTimeout(total=60)
async with aiohttp.ClientSession(timeout=timeout) as session: async with aiohttp.ClientSession(timeout=timeout) as session:
async with session.post( async with session.post(
f"{OLLAMA_URL}/api/generate", f"{OLLAMA_URL}/api/chat",
json={"model": ASK_MODEL, "prompt": prompt, "stream": False}, json={
"model": CREATIVE_MODEL,
"stream": False,
"messages": [
{"role": "system", "content": system_msg},
{"role": "user", "content": user_msg},
],
},
) as response: ) as response:
data = await response.json() data = await response.json()
text = data.get("response", "").strip() text = data.get("message", {}).get("content", "").strip()
# Parse FOR and AGAINST from the response # Parse FOR and AGAINST from the response
for_text = "" for_text = ""
@@ -2285,7 +2293,6 @@ async def cmd_debate(client: AsyncClient, room_id: str, sender: str, args: str):
for_text = for_part.replace("FOR:", "").strip() for_text = for_part.replace("FOR:", "").strip()
against_text = against_part.strip() against_text = against_part.strip()
else: else:
# Fallback: try to split in half
lines = [ln.strip() for ln in text.split("\n") if ln.strip()] lines = [ln.strip() for ln in text.split("\n") if ln.strip()]
mid = len(lines) // 2 mid = len(lines) // 2
for_text = " ".join(lines[:mid]) if lines else "No argument generated." for_text = " ".join(lines[:mid]) if lines else "No argument generated."
@@ -2307,7 +2314,7 @@ async def cmd_debate(client: AsyncClient, room_id: str, sender: str, args: str):
f'<blockquote>{for_text}</blockquote>' f'<blockquote>{for_text}</blockquote>'
f'<font color="#ef4444"><strong>❌ AGAINST</strong></font><br>' f'<font color="#ef4444"><strong>❌ AGAINST</strong></font><br>'
f'<blockquote>{against_text}</blockquote>' f'<blockquote>{against_text}</blockquote>'
f'<sup><em>via {_model_label(ASK_MODEL)}</em></sup>' f'<sup><em>via {_model_label(CREATIVE_MODEL)}</em></sup>'
) )
await send_html(client, room_id, plain, html) await send_html(client, room_id, plain, html)