

Not a huge sum, but consider all the other things you could get for less than 30 dollars. A dollar per day is roughly 30 dollars per month. Not a lot at first glance, but 20–30 questions can get you to a dollar which still isn’t a huge number, but it adds up. Our queries together with the prompt and response were around 500 tokens, and while using the “best of” parameter and the davinci engine, the cost would be somewhere between 3 and 5 cents per question. While very flexible in terms of pricing, the fact that for every request you have to send the whole prompt can drive the cost up significantly.
#Discord chatbot trial#
The trial is also reasonably generous, with 300k tokens being enough to get a good idea about what you’re dealing with, although you can definitely burn through them surprisingly fast.

The occasional snarky response or burn over a typo got us laughing, and some of its replies were so insightful that for a second we forgot we were talking to an API, instilling a sense of somber. The real magic came from those little personality touches. It was also incredibly fast, most responses taking less than 1 second to be processed and sent back even over Discord. GPT3 proved to be knowledgeable across all fields that we probed it for, even being snarky when we made typos or sent the message before we finished writing it. The responses were articulate and had a twinge of personality added to them.

#Discord chatbot code#
Since the discord.py functions are quite strict, I made a function that would send the Discord message to GPT 3 together with the prompt and import it into the main bot code as a function called ask().Įven with a fairly short prompt, the results were really impressive. OpenAI has an example for a chatbot with a personality, so I decided to add one too and wrote the prompt in an attempt to create a brainy and smug android. Named so because I made the first commit on this project in November.

#Discord chatbot how to#
There are a few parameters to tweak, but the only real learning curve is figuring out how to use the stop sequences.Įnter November, or 11 for short. You provide a prompt, set the stop sequences, and submit it via an API call to get a generated response back. While we’re not all programmers, all of us work in a STEM related field. With access to GPT3, I figured a chatbot designed to assist in our technical tasks would be a great project. I’ve already made a chatbot previously (writeup coming before the heat death of the universe) that was pretty successful and also a good avenue to practice my javascript. I have a private discord server for a few friends to talk about ideas, current events and projects together. So I jumped right out of bed and to my PC to read the docs. The email just said I now have a trial access to GPT3, either through March or until I hit my quota, whichever comes first. Suffice to say that woke me faster than any amount of binge drinking Monster energy drinks would. On the 19th of December, I woke up bleary eyed on a Saturday after another late night of doing CTFs and reached for my phone to check the time, expecting a lazy weekend ahead to cool down and I noticed an email from OpenAI. A week with GPT3 - Making a Discord chatbot
