Write A ChatGPT Chatbot With Node.js
In this video we will build an AI chatbot from scratch using Node.js, the OpenAI library and the ChatGPT API.
Code:
https://github.com/bradtraversy/chatgpt-chatbot
Blog Post:
https://www.traversymedia.com/blog/chatgpt-chatbot-nodejs
Check Out My Courses:
https://traversymedia.com
Timestamps:
0:00 – Intro
2:57 – Getting Setup
5:26 – OpenAI API Key
6:18 – OpenAI Library Setup
8:00 – Chat Completion Example
11:30 – Creating The Chatbot
13:42 – ReadlineSync Example
16:14 – Get User Input
18:05 – Exiting The Program
18:49 – Chat Completion for Chatbot
21:36 – Trying Out The Bot
22:13 – Storing The Chat History
25:22 – Update Chat History
26:05 – Final Test
source