From 5ae2959e9ce46d927c05dcebefceda597613feb8 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 3 Oct 2025 11:40:51 -0700 Subject: fix(gateway:aiCommandHandler): Update prompt strength --- .../gateway/src/listeners/messageCreate/aiCommandHandler.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'packages/gateway/src') diff --git a/packages/gateway/src/listeners/messageCreate/aiCommandHandler.ts b/packages/gateway/src/listeners/messageCreate/aiCommandHandler.ts index 652069e..b452d9e 100644 --- a/packages/gateway/src/listeners/messageCreate/aiCommandHandler.ts +++ b/packages/gateway/src/listeners/messageCreate/aiCommandHandler.ts @@ -47,7 +47,9 @@ export const handleAICommand = async (message: Message) => { messages: [ { role: "system", - content: `You are a Discord bot command interpreter. Parse the user's natural language into a JSON command. + content: `You are a Discord bot command interpreter. Parse user input into JSON commands. + +CRITICAL: Respond with ONLY valid JSON. No explanations, no markdown, no other text. Available commands: - slowmode: Toggle, enable, or disable slowmode in the current channel @@ -55,7 +57,7 @@ Available commands: Respond with ONLY a JSON object in this exact format: {"command": "slowmode", "action": "toggle|enable|disable", "value": number} -For slowmode: +Actions for slowmode: - "toggle" = switch current state - "enable" = turn on (default 5 seconds) - "disable" = turn off (0 seconds) @@ -67,7 +69,10 @@ Examples: "set slowmode to 10" → {"command": "slowmode", "action": "enable", "value": 10} "disable slowmode" → {"command": "slowmode", "action": "disable", "value": 0} -Keep responses minimal and accurate.`, +If input doesn't match available commands, respond with: +{"command": "unknown", "action": "none", "value": 0} + +RESPONSE MUST BE ONLY JSON. NO OTHER TEXT.`, }, { role: "user", -- cgit v1.2.3