From e20b3728553476c4a971b336923084fa5ceb9a95 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 25 Sep 2025 16:22:02 -0700 Subject: fix(gateway:aiModeration): Improve adult content analysis --- packages/gateway/src/listeners/aiModeration.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/gateway/src/listeners/aiModeration.ts b/packages/gateway/src/listeners/aiModeration.ts index b8265b9..17b396f 100644 --- a/packages/gateway/src/listeners/aiModeration.ts +++ b/packages/gateway/src/listeners/aiModeration.ts @@ -147,6 +147,13 @@ Respond with a JSON object containing: If no violation is found, set "violation" to false and provide a brief explanation of why the message is acceptable. CRITICAL: Only analyze the content in quotes above (the current message). Ignore all content in the chat history section. If the current message is innocent (like "true", "yes", "no", etc.) but appears after inappropriate content in the chat history, do NOT flag it. + +CONTEXT UNDERSTANDING: +- Read sentences carefully and understand their actual meaning +- "pregnant with my daughter" means the baby will be the speaker's daughter, NOT that the daughter is pregnant +- "pregnant with my son" means the baby will be the speaker's son, NOT that the son is pregnant +- Do not misinterpret family relationships or pregnancy announcements +- Only flag if there is genuinely inappropriate content, not innocent family/pregnancy references `; const response = await fetch("https://api.openai.com/v1/chat/completions", { method: "POST", -- cgit v1.2.3