Profanity/bad input filter and consequences

I am using chat gpt4 turbo and want to know how I can prevent users from prompting with bad words/profanity. And if the users prompt with profanity how would this impact my API account.

Would I have to filter the input myself using anaother tool or will chatgpt not respond and provide the error message. I don’t want to test this myself as I don’t want to negatively impact my account.

I am using chatgpt 4 turbo not text to iamge so the consequences shouldn’t be nearly as worse

OpenAI has a moderations endpoint to block inappropriate content, but it is smart and based on the whole impact of the message, not just “bad words” (which is a strange concept in many languages - try to block my “anjing!” and not impact regular speech…)

So if you don’t want certain words to ever be written, you’ll have to perform that filtering or blocking yourself.

2 Likes

It seems your concern is how user messages passed to the model through your API key will reflect on you.

Profanity is not a concern as far as OpenAI goes, so unless you have your own moral imperative to prevent cursing, you’ll be fine if you just use the moderations endpoint to filter inappropriate messages.

If you’re doing that, then you’re covered as far as OpenAI is concerned, because you’re demonstrating a good-faith effort to prevent misuse of the models.

See: https://platform.openai.com/docs/guides/moderation

for details.