KnowItAll Intro

Tom Chant
InstructorTom Chant
Share this video with your friends

Social Share Links

Send Tweet
Published 8 months ago
Updated 8 months ago

Build a powerful chatbot using the latest GPT-4 open AI model or the capable GPT 3.5 Turbo model. This section explores the increasing prevalence of chatbots in web development and helps you understand how to create one from scratch.

Learn about the specific syntax used by GPT-4 and GPT 3.5 Turbo, and discover techniques to instruct the chatbot's behavior and personality. Dive into concepts like presence penalty to control new topic discussions and frequency penalty to manage repetitive wording.

Additionally, explore how to store conversations in a database for persistence. While waiting for access to the GPT-4 API, you can use GPT 3.5 Turbo as a substitute. Join this course to master the art of building intelligent and engaging chatbots that can converse at a human level.

[00:00] It's official, chatbots are taking over the world. Loads of sites have them, and since the arrival of the more advanced chat GPT models, like TextDaVinci 003 and now GPT-4, the model we're about to use, chatbots are going to skyrocket even more.

[00:16] And as they are one of the most common uses for AI in web dev, this course wouldn't be complete without one. So we're going to build a chatbot using GPT-4, the latest open AI model at the time of recording. And it looks like this. Know-it-all does exactly what it says.

[00:35] It answers your questions and converses with you at a human level. You can ask it anything and it will do its best to answer. Now, I need to say a quick word about GPT-4. At the time of recording, you have to join a waiting list to get your hands on the GPT-4 API. Now, I'm sure that will change in time,

[00:54] but if you haven't got GPT-4 API access now, you can click on this slide. It's a link which will take you to the waiting list signup page. Now, if you don't have access to the GPT-4 API yet, no problem. Everything we do will work with the GPT 3.5 Turbo model.

[01:13] And this is also a very, very capable model. So just take a note of that right now if you don't have the GPT-4 API yet. And then wherever in the course we use GPT-4, you can use GPT 3.5 Turbo instead. And then when you get the GPT-4 API access,

[01:31] you can just swap out GPT 3.5 Turbo for GPT-4 as I'll be using in this project. So what exactly are we going to study? Well, we'll take our knowledge from the previous project and we're going to add in the chatbot specific syntax used by GPT-4 and the GPT 3.5 Turbo models.

[01:52] The syntax is exactly the same and it will work with both models just fine. We'll also look at how you can instruct the chatbot to behave in a particular way or have a specific personality. And then we'll look at something called presence penalty, which can control how likely the chatbot is to talk about new topics.

[02:10] And we'll also look at something called frequency penalty, which can control how repetitive the chatbot is in its choice of words and phrases. And finally, we'll change direction so that we can store our conversation in a database so it persists even if a user reloads the page or closes their browser. Now, I just want to give you a quick warning again

[02:29] that at the moment our API key is visible on the front end. So be sure to keep it safe, don't share it and make sure you ignore the end file if you're publishing to a repo. Okay, that's enough chat from me. I've already got some HTML and CSS prepared for this project. So let's take a look at that

[02:47] and then get this chatbot working.

egghead
egghead
~ 39 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today