From the course: OpenAI API for Python Developers

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Add a moderation layer

Add a moderation layer

- [Instructor] In the next example, we look at the steps to integrate a moderation layer. First, we define a request to the moderation endpoints to create a moderation object, then return a response with a classification and category scores. And you can find the full list of categories to verify under which category falls, any content that could express hate, harassment, violence, or sexual content. And we're going to use this quick start example to get started with our project as well. So let's go back to the project. So first we want to make sure that we follow all the instructions. So first, install the packages, set up the API key, so that is an important step. And after that you'll be ready to start the app. So mine is already up and running, so that's going to be visible under this link, localhost. So let's go check it out in the browser. So here is the interface of our Chatbot App. So we're going to try to make an interaction with it, like by asking a simple math question, what…

Contents