moderator-api / .env.example
Mohameddda's picture
Use OpenRouter glm-5.1 as Arabic language moderator
1308a36
# ---- API Security ----
# Replace with a strong random string before deploying
MODERATOR_API_KEY=change-me-before-production
# ---- AI Models ----
# Multilingual model (en, fr, it and more)
MODEL_NAME=citizenlab/distilbert-base-multilingual-cased-toxicity
# Dedicated Arabic hate-speech model (higher accuracy for Arabic)
ARABIC_MODEL_NAME=Hate-speech-CNERG/dehatebert-mono-arabic
# Confidence threshold (0.0 – 1.0). Text scored above this is flagged toxic.
TOXICITY_THRESHOLD=0.70
# Separate (lower) threshold for Arabic – the Arabic model outputs
# lower confidence scores than the multilingual model.
ARABIC_TOXICITY_THRESHOLD=0.45
# ---- Arabic LLM Verification via OpenRouter (optional) ----
# OpenRouter API key from https://openrouter.ai
OPENROUTER_API_KEY=
# Arabic LLM model name
ARABIC_LLM_MODEL_NAME=glm-5.1
# OpenRouter base URL for chat completions
ARABIC_LLM_BASE_URL=https://opencode.ai/zen/go/v1/chat/completions
# Grey zone: scores between LOW and HIGH trigger LLM verification
LLM_VERIFY_LOW=0.40
LLM_VERIFY_HIGH=0.85