Build AI Chat Bot using ChatGPT API 👉 gpt-3.5-turbo 👈
Vložit
- čas přidán 18. 03. 2023
- #openai #chatgpt #gpt4
In this video, we'll show you how to build a chatbot using the OpenAI's Chat GPT API and Flask. We'll walk you through step by step, from setting up your Flask app to integrating with the gpt-3.5-turbo API , and displaying the chatbot conversation in a user-friendly interface.
We'll cover the basics of using the new OpenAI API for Chat completion, including setting up an account and creating an API key. We'll then show you how to create a Flask app and set up a basic chatbot interface using HTML, CSS, and JavaScript.
Next, we'll integrate with the OpenAI API model gpt-3.5-turbo and use it to generate responses for our chatbot. We'll show you how to handle user input, send it to the OpenAI API, and receive and display the response in our chatbot interface.
We'll also cover some advanced features, including formatting the chatbot conversation to make it more user-friendly, handling errors and exceptions, and adding support for code snippets and syntax highlighting.
GitHub Repo :
github.com/mnick-yt/Chat-Bot-...
What is a Chat Bot?
A chatbot is an AI-powered computer program designed to simulate a conversation with human users, typically over the internet. Chatbots can be integrated into various platforms such as websites, messaging applications, or voice assistants, and can interact with users via text, voice, or other modalities.
Chatbots use natural language processing (NLP) and machine learning algorithms to understand user inputs and respond appropriately. They can provide a range of services such as answering frequently asked questions, providing customer support, making recommendations, or even facilitating transactions.
Whether you're a beginner or an experienced developer, this video will provide you with all the tools and knowledge you need to create your own chatbot using the OpenAI API and Flask. So, let's get started!
Company's are using ChatGPT :
1. Stripe leverages GPT-4 to streamline user experience and combat fraud.
2. Morgan Stanley wealth management deploys GPT-4 to organize its vast knowledge base.
3. Be My Eyes uses GPT-4 to transform visual accessibility.
4. GPT-4 deepens the conversation on Duolingo.
5. Yabble is Using GPT-3 to deliver fast, nuanced insights from customer feedback.
6. Khan Academy explores the potential for GPT-4 in a limited pilot program.
Related videos:
Make Deep Fake videos using AI:
• AI made this Video | ...
Build ChatGPT clone using ChatGPT and OpenAI API davinci model:
• Build ChatGPT Clone us...
Build a Website using ChatGPT in 1 minute:
• Build a Website using ...
Open AI made this GAME:
• Open AI Made This Game...
Subscribe To Our Channel : / @chatgpt-ai - Věda a technologie
Path:
• [00:00] Introduction to building a Chat GPT clone using Chat GPT API, specifically GPT 3.5 Turbo.
• [00:43] Building the front-end of the chat app using HTML and adding background colors for user messages and response messages.
• [00:43] Creating a Python Flask server with a default route and an API root that takes a string parameter and uses OpenAI API to generate a response and return it.
• [01:18] Using the example code for GPT 3.5 Turbo API and adding messages content in API request to get the response from the API.
• [02:14] Adding a custom user interface using CSS styling and images for the user and chat GPT.
• [03:24] Adding code highlighting functionality to display the response message's code section differently.
• [04:12] The chat app is a Chat GPT clone built using GPT 3.5 Turbo API, and it can generate responses to user input text.
Strong work!🎉
video was very helpfull thanks
Good Explanation 😁 Thanks ❤️
GPT = a Good Personal Tool
Good , very well explained but if you make another video building a chatbot for whatsapp and website, it will be very helpful.
By The vedio helped a lot getting started
Very good and completely explain the procedure very much like it
Amazing! Curious if you have a 2024 version of this process?
I want to return a form when user enters a specific keywords and form submit has to do a function like send an email how can i do it
Very understandable but i need some help from the vs code edit about how to connect my server and more
Excellent video! how can i train the chatbot with info from a .txt?
Awesome,
Can you plz let me know where i can download the code /files you created?
Could you make a super quick video on how to do all this simply by using the files from github fo noobs like me?
which software are you using
can you tell how can i host it for public use and there should be a login function
And If Possible How Can We Make a Ai cahtbot connected To Diffrent 3 to 4 ai and answer user acoording to use case like chat gpt for code related , gemini for data or text generation and waifu diffusion for image generation all ai in one chatbot
Can you make a tutorial on how to make it as a discord bot?
It doesn't run on The Replit app
Can you make this into a voice ai chatbot instead?
I am facing one error the server every time says undefined.
Request to build a better webapp, chatgpt can automatically show the code that can copy and it is able to automatically generate table, in addition. I want to use chat gpt-4-32k
IT'd be great if you chaptered this video.
can we use it in offline mode?
when i tried to run this code i had some problems in console :
- Uncaught ReferenceError: module is not defined at python.js:446:1
- Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)
- SyntaxError: Unexpected token '
Does this code has the ability to continue a conversation, that is, can remember the previous responses and prompts while giving any new response like that of a chat in chatGPT?
i have no clue
Greetings. I will be happy to buy the full bot code when the gpt-4 API becomes available.
its available its just on a waitlist
many companies are already started using it.
1. Stripe leverages GPT-4 to streamline user experience and combat fraud.
2. Morgan Stanley wealth management deploys GPT-4 to organize its vast knowledge base.
3. Be My Eyes uses GPT-4 to transform visual accessibility.
4. GPT-4 deepens the conversation on Duolingo.
5. Yabble is Using GPT-3 to deliver fast, nuanced insights from customer feedback.
6. Khan Academy explores the potential for GPT-4 in a limited pilot program.
How to open server log
But the previous messages doesnt gets recorded, and your bot starts anew each time u send a message
you have to put your last response into a variable then before you send a prompt put variable + Prompt then append the response to the variable and repeat
Is it possible to Customise to the specific subject/ specific person disclosures ?
If I am understanding what you are saying... yes
Sure
@@JEROME_BLACKSTONE I'll tell you what I'm expecting exactly.. There's a person famous person disclosures are available in a video content , I would like to take all the transcript and train the model. Model should be preferably chatGPT.. is that possible?
Es ist durchaus beunruhigend zu bedenken, dass nur wenige privilegierte Personen mit Zugang zu den besten KI-Modellen die kreative Macht innehaben könnten. Wir müssen sicherstellen, dass die Vielfalt der Kreativität für kommende Generationen erhalten bleibt. Demokratisierung des Zugangs zu diesen Technologien und der Schutz individueller Kreativität sind entscheidend für eine blühende Gesellschaft. Lasst uns eine Zukunft gestalten, die sowohl die Möglichkeiten der KI nutzt als auch die kreative Eigenständigkeit jedes Einzelnen bewahrt.
Hi, I want to create a chatbot with user data. The chatbot should be able to give responses about user data only, not outside of that. How can I achieve this?
I don't know where you at in your proces but is it an idea to make a custom gpt that strictly does what you ask it with instructions and text files?! Then trow that to the Api's. Just thinking out loud TOL..
I think skynet is not destroyed 😮
How to add later by later Text Typing effect in Response of ChatGPT
not sure how to do in browser.
But you can use PyAutoGui --> function "typewrite()" or "write()" with time interval.
it will generate that latter by latter typing effect.
Foooooook ! This dude navigates through this 💩 like a dolphin in water
It gives template error
Impressive, what are the skills required to learn this? Python?
No! Quantum Computing.
Bro! Please Help Me I Really Appreciate The Work! But For Me I Entered the code in github and My Own API KEY it's still not working just showing a white screen in the web page could you please help bro
update openAI module to latest version, openAI API is paid and GitHub code is working, read "readme .md" file.
@@ChatGPT-AI ok
apis are paid it is showing my limit is reached
You are amazing. Thanks.
Got some error: "Incorrect API Provided"
you have to add your own api.
updated the code for `index.html` file.
issue : so if you ask for question related to `code` then it will display response. But if the response doesn't contain `code` then it was not displaying.(because i deleted the else statement by mistake.)
Fixed : updated the code and now it will work . (i checked )
Note : you have to update `openai` module to latest version 0.27
Nice video. What voice ai are you using?
lovo ai (name : ken )
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
please help me sir
the result when i run my program
I know this is a little late, but you might have you index.html file located in the same location as your python file. Flask requires you to place your index.html files in a templates folder in the same project. Make a templates folder, put your index.html file in there, and it should be fixed
So sad, It not work today "module 'openai' has no attribute 'ChatCompletion'"
update to latest version or check docs
1:49s - Where do you go to start your server?
it's command prompt / cmd
use cmd or Terminal from VS code.
Amazing thank you great! How do i put to website?
same question
Hi there I downloaded the code and add my api key but when I send a query to chat bot me message is shown but in reply chat gpt reply is empty
same thing happens to me too
code is working.
try to console.log() the response. (to see if you are getting response or not?)
also in developer tool-> network->api , click on POST api, check for response.(to see if you are getting response or not?)
if Yes, then it's a problem in displaying the message.(index.html ->look into api request code -> ".then" where it handles the response)
Note: sometimes, there is no response from open AI.(you can see that error in server logs. you can't solve it. just try sending request again.)
no request is being sent
Has anyone made progress to fix this? I just watched the tutorial, set everything up, and it looks good with the exception that after I send my initial greeting, the bot message returns a blank message. I don't see any errors.
updated the code for `index.html` file.
issue : so if you ask for question related to `code` then it will display response. But if the response doesn't contain `code` then it was not displaying.(because i deleted the else statement by mistake.)
Fixed : updated the code and now it will work . (i checked )
Note : you have to update `openai` module to latest version 0.27
Can you provide the source code that you got from chatgpt as I can't get the same like you so can you provide source code
added in description.
For me, the chat is bugging, did someone modify the files?
updated the code for `index.html` file.
issue : so if you ask for question related to `code` then it will display response. But if the response doesn't contain `code` then it was not displaying.(because i deleted the else statement by mistake.)
Fixed : updated the code and now it will work . (i checked )
Note : you have to update `openai` module to latest version 0.27
this chat bot do not have history understanding context, right?
may be not. because it's using API to get response for the request query.
If i make this website live and 100 people use it --> then in the backend it's same API key and OpenAI will see all request as single user -->so remembering history will create chaos in the response.
He used GPT to summarize the first-year subjects in uni.
You not give whole information... I am MERN developed i download your repo... I install python and I try to run your file... But it's giving error... His saying No module named 'flask'
most of my videos are connected with previous videos.
if you are new then,
install flask ->pip install flask
also install openai module ->pip install openai
Note: thanks for reminding me to add some description on how to use it.
Can you make Wheel Of Fortune game using ChatGPT?
sure.
You exceeded your current quota, please check your plan and billing details. ?
API is paid.
not working for me i use linux chrome book chrome os is there any problem sir?
upgrade OpenAI module to latest version. (read docs : v 0.27 )
and API is not free.
@ChatGPT-AI bro now it showing 500 internal server eroor when i m going to run it
why it showing 500 internal server error when i m running it
@ChatGPT-AI
api key is now paid@@sarthaknegi4869
is there any free chatgpt api's available?
How to use this on wix website
this isn't google
In chatgpt "the end of the world" story
As an AI language model, I cannot predict the future or know for sure whether the end of the world will happen. However, there are several theories and scenarios that people have proposed about how the end of the world could come about.
One such theory is a global catastrophic event, such as a large asteroid impact, a supervolcanic eruption, or a global pandemic. Another possibility is that human activity could cause irreversible damage to the planet's ecosystem, resulting in ecological collapse and a breakdown of the Earth's systems. Other possibilities include the eventual heat death of the universe or the emergence of an unstoppable AI that could potentially lead to the end of human existence.
However, it is important to note that while these scenarios are all plausible to some extent, it is impossible to predict with certainty whether any of them will occur or when they might occur. It is important to focus on taking care of our planet and each other in the present, and to work towards building a sustainable and resilient future.
bruh now there are so many copy on playstore
Uzbekcha
rate limit error
Yeah, we are Doomed 😂
😹
api is not free though if anyone is thinking of doing it
they gave me 20 dollar credit for free 🤩 (i don't know why?)
@@ChatGPT-AI for first time api we get 20$ is free for a month only, use it up before time expires cause i had only use .2 cents then i thought will use later and bam its gone!
could you pls share the files
Not Working! Unable to get response
it's working.
you have to add your API key.
also i have updated the code. check GitHub repo.
ModuleNotFoundError: No module named 'Flask'
pip install Flask
How to start a server
My question exactly
This does not explain a single thing. Making a youtube video where you just copy code from chatgpt is not helpful at all. If I wanted to copy code I would have gone straight to chatgpt and not here.
Sir can you please provide the code
added in description.
Too fast and unexplained :/
Please provide the code of this clone.
It's literally copy and paste
added in description.
Thanks
Why don't you just use the chat GPT app? why create a clone of the same thing?
I think the point is to show you the possibilities of what can be built using the power of the ChatGPT API. The possibilities are endless
Can you provide code files?
added in description.
Your videos are so brutal, at least take a pause and explain bro
That's not a clone...
how about a AI chat Bot? 🫣
@@ChatGPT-AI I have a little drugstore in Brazil, i would like to provide a personalized chatbot for my whatsapp and website with information related to the niche and chatting as a normal person remembering the last conversations, names and so on about each customer....but I don't know how to do It. Do you have a tutorial if It can be easily done ?
Hi there I downloaded the code and add my api key but when I send a query to chat bot me message is shown but in reply chat gpt reply is empty
updated the code for `index.html` file.
issue : so if you ask for question related to `code` then it will display response. But if the response doesn't contain `code` then it was not displaying.(because i deleted the else statement by mistake.)
Fixed : updated the code and now it will work . (i checked )
Note : you have to update `openai` module to latest version v0.27.0
very fast tutorial, not explained enough, not for beginner
app.py 29line (if completion.choices[0]. message) showing error
if it's giving you error then remove if/else and just replace with,
"return completion.choices[0]. message".
@@ChatGPT-AI TQ sir
openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.