AI Function

Evaluate if a Comment is Offensive

Define what constitutes an offensive comment, and have AI reject it

Copy it in your workspace

Customize this AI to include all the relevant "offenses" you want to monitor.

For example, you might want to exclude hate speech from a comment section or verify a transcript of a video doesn't include words that can be considered dangerous or inappropriate for your app.

{"steps":[{"id":"71556ad8-238a-44a4-91b7-6bd8ae504e50","end":{"outputVariables":{"isOffensive":"{{result}}"}},"chat":{},"type":"end","__editingData":{"top":"-2.5494840653470536px","left":"296.3042998143328px"},"defaultTransitionId":null},{"id":"60bcd01b-c8d2-480c-8fac-757c38569e9a","type":"userMessage","userMessage":{"mode":"background","source":"user","message":"This is the content: \n\n{{content}}","destinationVar":"result"},"__editingData":{"top":"-2.5494840653470536px","left":"154.1574577647204px"},"defaultTransitionId":"71556ad8-238a-44a4-91b7-6bd8ae504e50"}],"refs":{"prompts":{},"functions":{}}}

Other AI cloud functions