Make Your Own AI Chatbot using the ChatGPT API – Simple, Easy and CHEAP!



There’s now an official API for ChatGPT. It’s pretty amazing. And it’s amazingly cheap compared to the previous models that we’ve used.

We can now easily make our own custom ChatGPT bots, it’s just a few lines of simple Python code.

In this video, we’ll develop a simple prompt and test it out in the ChatGPT playground.

We’ll then take this prompt and use it to create a simple command line chatbot.

It’s dead simple and a lot of fun.

0:00 Why is this big news?
0:39 Using the playground to build our chatbot
2:35 Testing out the chatbot in the playground
3:15 What’s changed from the davinci model?
3:40 The new API chat context
4:35 Getting an API key
4:50 Getting the code from GitHub
4:55 Updating the code to use our API key and prompt
5:30 Other parameters
5:45 How the code works
6:00 Moderation is key!
6:50 Calling the API
7:25 Does it work?

All the code is here: https://github.com/atomic14/command_line_chatgpt


If you’d like to help support the channel then I have a Patreon page: https://www.patreon.com/atomic14

And if you’re shopping on AliExpress or Amazon then if you click on these links I will get a little bit of affiliate money:

Aliexpress – https://s.click.aliexpress.com/e/_Ac05mF
Amazon – https://www.amazon.com/?tag=atomic14-20

You can also join us on Discord here: https://discord.gg/h2DDnDdjD2

And we’ve got an exciting new newsletter! https://makernews.substack.com/

20 comments
  1. Question: After running the code and going into the terminal…Im not seeing the prompt (venv) and am unable to enter the "playground." How do I get it to ask my, "what can I help you with?"

  2. I want to limit scope of gpt
    That is answer from only the topics which I mentioned like answer only related to health, if they ask write python program/ any other query say I don't know

    Can u pls advise

  3. So after creating a proper trained response and model is trained on your system prompt is that when u download apikey

  4. Hi,
    Very interesting video and this ai Chatbot is exactly what I look for. I’ve search for months and still can’t get someone able to built that. We are an online platform provide students practicing their important exams.
    I found difficulty in the technical part. Wonder you possible help us to build a Chatbot in our website?

  5. Great but this isn't your "own chatbot" if it acts the same way as playground acts with the same prompts. Custom data and how you fine tune it would be better and how the loop of human training with custom data would be interesting.

  6. Hi, I want to make my campus guide chatbot. what is the best way to provide a lot of campus-related information to chatgpt? am I supposed to provide information in the "system"?

  7. Hey I love your open ai vids, they’re incredibly helpful. I was just curious, what program do you use to host the GitHub code and virtual environment?

Comments are closed.