Assigning an ESRB rating to text
In the last example, we provided sample data to help with our classification task. But GPT-3 is pre-trained with a huge dataset, meaning it can perform a surprising number of classification tasks without providing any example data. Let's take a look at another example using the completions endpoint. In this example, we'll look at classifying text with an Entertainment Software Rating Board (ESRB) rating.
In this example, we will use the completions endpoint to assign an ESRB rating to text without any example data.
Node.js/JavaScript example
To create the ESRB rating classifier example in Node.js/JavaScript
, follow these steps:
- Log in to replit.com and open your exploring-gpt3-node REPL.
- Create a new file –
chapter08/esrb-rating-classifier.js
. - Add the following code to the beginning of the
esrb-rating-classifier.js
file:const axios = require('axios'); const apiKey = process...