Instruct LLM to avoid markdown formatting in iMessage responses

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 23:24:43 -04:00
parent bc19f52052
commit 7912c83ca3
+5
View File
@@ -341,6 +341,11 @@ async def _process_and_reply(
recent_messages = list(messages)[-20:] recent_messages = list(messages)[-20:]
system_prompt = await build_system_prompt_with_memories(str(user.id)) system_prompt = await build_system_prompt_with_memories(str(user.id))
system_prompt += (
"\n\nIMPORTANT: You are replying via iMessage. Use plain text only. "
"Do not use markdown tables, headers, bullet points, bold, italics, "
"or any other markdown formatting. Write in natural prose."
)
messages_payload = [{"role": "system", "content": system_prompt}] messages_payload = [{"role": "system", "content": system_prompt}]
for msg in recent_messages[:-1]: for msg in recent_messages[:-1]: