feat: add Groq Llama Prompt Guard moderation integration
- Updated .env.example to include Groq API configuration. - Enhanced config schema in config.ts to support Groq API keys and settings. - Implemented Groq moderation API call in indonesianTextNormalizer.ts as a fallback for badword detection. - Removed the Indonesian slang normalization function and related tests to streamline moderation logic. - Updated tests to reflect changes in moderation strategy, focusing on emoji normalization and badword detection.
This commit is contained in:
@@ -52,6 +52,11 @@ AI_LLM_MODEL=free
|
||||
# NVIDIA Nemotron Content Safety Configuration
|
||||
NVIDIA_NEMOTRON_API_KEY=your_nvidia_api_key_here
|
||||
|
||||
# Groq Llama Prompt Guard Fallback Configuration
|
||||
GROQ_API_KEY=your_groq_api_key_here
|
||||
GROQ_MODERATION_MODEL=meta-llama/llama-prompt-guard-2-86m
|
||||
GROQ_MODERATION_BASE_URL=https://api.groq.com/openai/v1/chat/completions
|
||||
|
||||
# Database Configuration (PostgreSQL)
|
||||
# Option 1: Use DATABASE_URL for connection string
|
||||
# DATABASE_URL=postgresql://user:password@localhost:5432/discord_bot
|
||||
|
||||
Reference in New Issue
Block a user