Build AI Chat Bot using ChatGPT API 👉 gpt-3.5-turbo 👈 #chatgpt #openai

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
chat GPT API is released and today I will build a chat GPT clone using chat GPT API the API is called GPT 3.5 Turbo go to chatgpt and type write code for index.html file this is a chat app and users can write messages and on click send button send post requests to slash API root add different background colors for user message and response message now chat GPT is writing the front-end side code copy this paste it here write code for python flask server default route at return index.html file and slash API root with post request that takes string from parameter and use open AI API to generate response and return it I didn't mention the API model as of now copy this code paste it here chat GPT decided to use the DaVinci model askchat GPT about GPT 3.5 turbo API well chat GPT doesn't know about its own API implementation go to API reference this is example code for GPT 3.5 turbo API copy this paste it here clean up the code remove model name don't forget to add your own API key here add messages content in API request this is the demo response we need message.content so add dot content and return it now I will add my openai API key here let's start our server this is how our chat app looks like write hello and send no response in the server log it shows an error I made a mistake we have to return the message object and I also added the FL statement in case of no response from the chat GPT API let's restart our server refresh write hello and send and we go get a response let's ask what an API is and this is our response ask for some example code response contains code but no highlight this is a working chat app built with chat GPT 3.5 turbo API I didn't like this user interface I created this style.css file and added some basic CSS to style the chat app I have also added images for the user and chat GPT inside index.html at this image tag before the user message to display the user image an image tag before response message to display chat GPT image for the code Block in the response I have written this code to wrap the code content within the pre and code tag let's start our server this is how our chat app looks like ask write python code to add two numbers and send now we have a user image with a user's message we received the response it shows the chat GPT image in the response message also for response messages text and code are displayed differently let's add some highlight functionality to highlight the code I'm using the same highlight.js theme I used in my previous chat GPT clone video copy and paste the CDN links for the theme let's restart the server refresh ask write python code to add two numbers and we got a response and it looks better now let's ask how to read a file in Python explain and write code and this is the response text and code sections both are separate and have different styles this chat app looks like a chat GPT clone I built this chat by using GPT 3.5 turbo API
Info
Channel: ChatGPT Tutorials
Views: 106,795
Rating: undefined out of 5
Keywords: chat gpt clone, chat gpt clone python, create chat gpt clone, build chat gpt clone, chat gpt clone github, chat gpt clone project, chat gpt api tutorial, chat gpt api python, prompt engineering, flask tutorial, what is api, openai api, openai api projects, openai api chatbot, chat gpt prompts, chatgpt api, chatgpt coding, chatgpt python, chatgpt prompts, chatgpt programming, openai codex, chat gpt explained, chat gpt, gpt-3.5-turbo, chat gpt api, gpt api
Id: etTE-mjLiTw
Channel Id: undefined
Length: 4min 22sec (262 seconds)
Published: Sun Mar 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.