Enable OpenAI’s moderation feature in your LLM applications to automatically detect and filter harmful content in user messages.
Helicone-Moderations-Enabled
to true
.
A Deep-Dive of the Moderation Process
Helicone-Moderations-Enabled
is true and the provider is OpenAI, the user’s latest message is prepared for moderation before any chat completion request.400 status code
. It’s crucial to handle this response appropriately.
If the message is not flagged, the proxy forwards it to the chat completion endpoint, and the process continues as normal.
Here’s an example of the error response when flagged:
Need more help?