OpenAI Moderation
Leverage OpenAI’s AI models to automatically detect and filter offensive, harmful, or inappropriate messages in real time. This option allows you to:- Define Custom Prompts – Set specific prompts to classify and moderate messages based on your needs.
- Choose an AI Model – Select the OpenAI model that best suits your moderation requirements.
- Contextual Moderation – Configure how many previous messages from the conversation should be considered for better contextual understanding.
- Flexible Moderation Actions – Block, allow, or take fallback actions if the API request fails.
- Secure API Management – Provide and manage OpenAI credentials directly in the CometChat dashboard.
How it works
When a message is sent, CometChat evaluates it against your enabled moderation rules. For an OpenAI rule, CometChat sends the message (optionally with recent conversation history for context) to OpenAI using the prompt and model you configured, then applies the action you defined — block, flag for review, or allow — based on the confidence threshold. If the OpenAI request fails, CometChat falls back to the behavior you selected (approve or block). Setting OpenAI moderation up involves three dashboard steps: creating an OpenAI Prompt list, configuring the OpenAI model and API key in Advanced Settings, and mapping the list to a moderation rule.Set up OpenAI Moderation
Step-by-step configuration: create the prompt list, set the model and API key, and create the rule.
Next steps
Moderation Overview
Understand the full moderation feature set.
Getting Started
Set up moderation rules and integration.
Rules Management
Create and manage moderation rules.
Custom API Moderation
Bring your own moderation service or model.