Creating chatbots
For the last set of examples, we'll look at creating chatbots. Technically, this would be classified as generating text so it could have been covered in Generating content and lists. But creating chatbots with GPT-3 is so much fun it deserves a section of its own. We'll start with a simple conversational chatbot.
A simple chatbot
For our simple chatbot, we'll be using the following prompt. We'll look at code for both Node.js/JavaScript and Python but the prompt for both is the same.
The first part of the prompt provides instructions for how the bot should respond and the general conversational style. You can change a lot about how the bot responds by changing the instructions and the example dialog. For instance, you could change the conversational tone by changing the words friendly and polite to rude and sarcastic.
Here is the prompt text for our simple bot:
The following is a conversation with an AI bot. The bot is very friendly...