Hello,
My app sends requests to the GPT-4 API, and to avoid conflicts with the usage policy, I’d like to check whether a text contains at least one element from a list before sending the request. If it does, I won’t send the request.
The text could be “Text to send to OpenAI’s API”, and the list of forbidden words could be: [“a”, “list”, “of”, “forbidden”, “words”, etc.]. What would be the simplest and most efficient way to do this? Both for storing the list of forbidden words and checking for the presence of a word (not in a backend workflow preferably).
Thank you in advance.