diff options
| author | Fuwn <[email protected]> | 2025-09-25 19:34:58 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-09-25 19:34:58 -0700 |
| commit | 5d60f9056f3c0e8322c1e4f7e63a87613a56bff0 (patch) | |
| tree | c5d62a2017663c7c70015fa1b2260acae159be56 | |
| parent | fix(gateway:moderationAgent): Update hate speech flagging (diff) | |
| download | umabotdiscord-5d60f9056f3c0e8322c1e4f7e63a87613a56bff0.tar.xz umabotdiscord-5d60f9056f3c0e8322c1e4f7e63a87613a56bff0.zip | |
refactor(gateway:moderationAgent): Add additional constants
| -rw-r--r-- | packages/gateway/src/listeners/moderationAgent/constants.ts | 5 | ||||
| -rw-r--r-- | packages/gateway/src/listeners/moderationAgent/utilities.ts | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/packages/gateway/src/listeners/moderationAgent/constants.ts b/packages/gateway/src/listeners/moderationAgent/constants.ts index e7906de..97359bb 100644 --- a/packages/gateway/src/listeners/moderationAgent/constants.ts +++ b/packages/gateway/src/listeners/moderationAgent/constants.ts @@ -6,8 +6,11 @@ export const EXCLUDED_CATEGORIES = [ export const MODERATION_LOG_CHANNEL_ID = "1406422619934167106"; export const MIN_MESSAGE_LENGTH = 15; export const MAX_SYMBOL_DENSITY = 0.6; -export const MAX_COMPLETION_TOKENS = 1000; +export const MAX_COMPLETION_TOKENS = 2000; export const MESSAGE_HISTORY_SIZE = 10; +// export const REASONING_EFFORT: "minimal" | "low" | "medium" | "high" = "minimal"; +export const VERBOSITY: "low" | "medium" | "high" = "medium"; +export const MODEL = "gpt-5-nano"; export const SAFE_WORDS = new Set([ "hello", "hi", diff --git a/packages/gateway/src/listeners/moderationAgent/utilities.ts b/packages/gateway/src/listeners/moderationAgent/utilities.ts index 717c1cc..44584ad 100644 --- a/packages/gateway/src/listeners/moderationAgent/utilities.ts +++ b/packages/gateway/src/listeners/moderationAgent/utilities.ts @@ -2,7 +2,9 @@ import { Message, TextChannel, ThreadChannel } from "discord.js"; import { MAX_COMPLETION_TOKENS, MESSAGE_HISTORY_SIZE, + MODEL, SERVER_RULES, + VERBOSITY, } from "./constants"; export const fetchMessageContext = async ( @@ -169,7 +171,7 @@ CONTEXT UNDERSTANDING: "Content-Type": "application/json", }, body: JSON.stringify({ - model: "gpt-5-nano", + model: MODEL, messages: [ { role: "system", @@ -182,6 +184,7 @@ CONTEXT UNDERSTANDING: }, ], max_completion_tokens: MAX_COMPLETION_TOKENS, + verbosity: VERBOSITY, }), }); |