feat: integrate NVIDIA Nemotron-3 Content Safety API for Indonesian badword detection
- Added configuration options for NVIDIA Nemotron API key, model, and base URL. - Refactored badword detection to utilize NVIDIA API, with a fallback to a local badword list. - Updated moderation functions to handle asynchronous operations for text evidence generation. - Removed dependency on the `indonesian-badwords` package and implemented custom detection logic. - Enhanced tests to accommodate asynchronous behavior and validate new detection methods.
This commit is contained in:
@@ -49,6 +49,9 @@ AI_LLM_API_KEY=your_9router_key_here
|
||||
AI_LLM_BASE_URL=https://9router.asepharyana.tech/v1
|
||||
AI_LLM_MODEL=free
|
||||
|
||||
# NVIDIA Nemotron Content Safety Configuration
|
||||
NVIDIA_NEMOTRON_API_KEY=your_nvidia_api_key_here
|
||||
|
||||
# Database Configuration
|
||||
DATABASE_TYPE=sqlite
|
||||
# DATABASE_TYPE=postgres
|
||||
|
||||
Reference in New Issue
Block a user