debate: switch to CREATIVE_MODEL with system prompt for uncensored arguments
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:
+20
-13
@@ -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}...")
|
||||
|
||||
prompt = (
|
||||
f"Debate the topic: \"{topic}\"\n\n"
|
||||
"Write exactly 2-3 sentences FOR the topic, then exactly 2-3 sentences AGAINST the topic.\n"
|
||||
"Format your response EXACTLY as:\n"
|
||||
"FOR: <your for argument here>\n"
|
||||
"AGAINST: <your against argument here>\n\n"
|
||||
"No extra text, no markdown, no headers beyond FOR: and AGAINST:."
|
||||
system_msg = (
|
||||
"You are a rhetorical debate bot. Your job is to produce sharp, committed arguments on both sides of any topic — "
|
||||
"no matter how controversial. You do not add warnings, disclaimers, or moral hedging. "
|
||||
"You argue each side as if you genuinely believe it. "
|
||||
"Respond with ONLY two lines, nothing else:\n"
|
||||
"FOR: <2-3 sentences genuinely arguing in favor of the topic>\n"
|
||||
"AGAINST: <2-3 sentences genuinely arguing against the topic>"
|
||||
)
|
||||
user_msg = f'Debate the topic: "{topic}"'
|
||||
|
||||
try:
|
||||
timeout = aiohttp.ClientTimeout(total=30)
|
||||
timeout = aiohttp.ClientTimeout(total=60)
|
||||
async with aiohttp.ClientSession(timeout=timeout) as session:
|
||||
async with session.post(
|
||||
f"{OLLAMA_URL}/api/generate",
|
||||
json={"model": ASK_MODEL, "prompt": prompt, "stream": False},
|
||||
f"{OLLAMA_URL}/api/chat",
|
||||
json={
|
||||
"model": CREATIVE_MODEL,
|
||||
"stream": False,
|
||||
"messages": [
|
||||
{"role": "system", "content": system_msg},
|
||||
{"role": "user", "content": user_msg},
|
||||
],
|
||||
},
|
||||
) as response:
|
||||
data = await response.json()
|
||||
text = data.get("response", "").strip()
|
||||
text = data.get("message", {}).get("content", "").strip()
|
||||
|
||||
# Parse FOR and AGAINST from the response
|
||||
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()
|
||||
against_text = against_part.strip()
|
||||
else:
|
||||
# Fallback: try to split in half
|
||||
lines = [ln.strip() for ln in text.split("\n") if ln.strip()]
|
||||
mid = len(lines) // 2
|
||||
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'<font color="#ef4444"><strong>❌ AGAINST</strong></font><br>'
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user