I have implemented the GPT-4 model in my chat Flutter app. I want to set a predefined list of categories to be locked when a query is made so that GPT should not respond or send premade default text in its response.
I have made a list of words and made a function to iterate through words in the list (blocked words) that can be present in the query. If a word is found, query is not sent to GPT, and a default response is sent to the user. But I want to set predefined categories, not words, that the GPT should understand and respond to accordingly, as I have also implemented Parental Control, but that is not efficient. because it checks words in the list to block words, not categories.
Please let me know how I can achieve this in my Flutter app.
I’m looking forward to hearing from you.
Kind regards.