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

Sdílet
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

Komentáře • 131

  • @labsanta
    @labsanta Před rokem +12

    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.

  • @AP-hv5dh
    @AP-hv5dh Před rokem

    Strong work!🎉

  • @anujurunkar6055
    @anujurunkar6055 Před 6 měsíci +1

    video was very helpfull thanks

  • @Cookie_360
    @Cookie_360 Před rokem +1

    Good Explanation 😁 Thanks ❤️

  • @11305205219
    @11305205219 Před rokem +10

    GPT = a Good Personal Tool

  • @tariqaziz3767
    @tariqaziz3767 Před rokem +2

    Good , very well explained but if you make another video building a chatbot for whatsapp and website, it will be very helpful.

  • @lazarusNoob
    @lazarusNoob Před 4 měsíci

    By The vedio helped a lot getting started

  • @MuhammadTahir-hk2uy
    @MuhammadTahir-hk2uy Před 10 měsíci

    Very good and completely explain the procedure very much like it

  • @thewebstylist
    @thewebstylist Před 6 měsíci

    Amazing! Curious if you have a 2024 version of this process?

  • @user-pb4mt1mv6j
    @user-pb4mt1mv6j Před 5 měsíci +1

    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

  • @IFTIIMKAMASKAXDA
    @IFTIIMKAMASKAXDA Před 3 měsíci

    Very understandable but i need some help from the vs code edit about how to connect my server and more

  • @eduardoruesta5180
    @eduardoruesta5180 Před rokem

    Excellent video! how can i train the chatbot with info from a .txt?

  • @imti2337
    @imti2337 Před 8 měsíci +1

    Awesome,
    Can you plz let me know where i can download the code /files you created?

  • @sampsonarchibaldclaxton7872

    Could you make a super quick video on how to do all this simply by using the files from github fo noobs like me?

  • @onlineincomeinsights
    @onlineincomeinsights Před rokem

    which software are you using

  • @lazarusNoob
    @lazarusNoob Před 4 měsíci

    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

  • @hectorftraducciones2785

    Can you make a tutorial on how to make it as a discord bot?

  • @AI_FutureZone
    @AI_FutureZone Před rokem

    It doesn't run on The Replit app

  • @dhianprameswari3524
    @dhianprameswari3524 Před 10 měsíci

    Can you make this into a voice ai chatbot instead?

  • @harshit_joshi18
    @harshit_joshi18 Před 7 měsíci

    I am facing one error the server every time says undefined.

  • @unidentifieduser5550
    @unidentifieduser5550 Před rokem

    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

  • @JoshuaYoung2
    @JoshuaYoung2 Před 3 měsíci

    IT'd be great if you chaptered this video.

  • @AhmadFahimShahi
    @AhmadFahimShahi Před 2 měsíci

    can we use it in offline mode?

  • @alaalabidi2955
    @alaalabidi2955 Před 7 měsíci

    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 '

  • @aniruddhaghosh2722
    @aniruddhaghosh2722 Před rokem +1

    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?

  • @Aleksey_Bibikov
    @Aleksey_Bibikov Před rokem +1

    Greetings. I will be happy to buy the full bot code when the gpt-4 API becomes available.

    • @gladosb5
      @gladosb5 Před rokem

      its available its just on a waitlist

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem +4

      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.

  • @maitrishorts4129
    @maitrishorts4129 Před rokem

    How to open server log

  • @Aji0t
    @Aji0t Před rokem +2

    But the previous messages doesnt gets recorded, and your bot starts anew each time u send a message

    • @AIContent-gx7yu
      @AIContent-gx7yu Před rokem +1

      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

  • @adiyogi-thefirstguru5144

    Is it possible to Customise to the specific subject/ specific person disclosures ?

    • @JEROME_BLACKSTONE
      @JEROME_BLACKSTONE Před rokem

      If I am understanding what you are saying... yes

    • @Cookie_360
      @Cookie_360 Před rokem

      Sure

    • @adiyogi-thefirstguru5144
      @adiyogi-thefirstguru5144 Před rokem

      @@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?

  • @sylviasokeschroter
    @sylviasokeschroter Před 4 měsíci

    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.

  • @user-jq9po6rd8q
    @user-jq9po6rd8q Před 7 měsíci

    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?

    • @Haagsebluf
      @Haagsebluf Před 6 měsíci

      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..

  • @CSN777
    @CSN777 Před rokem

    I think skynet is not destroyed 😮

  • @matrixcoderdev
    @matrixcoderdev Před rokem

    How to add later by later Text Typing effect in Response of ChatGPT

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem +1

      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.

  • @Generativepre-trained-trans

    Foooooook ! This dude navigates through this 💩 like a dolphin in water

  • @user-rn8zc9hw4l
    @user-rn8zc9hw4l Před 8 měsíci

    It gives template error

  • @renderllama7036
    @renderllama7036 Před rokem +1

    Impressive, what are the skills required to learn this? Python?

  • @RishikTalksOnAI
    @RishikTalksOnAI Před rokem +2

    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

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      update openAI module to latest version, openAI API is paid and GitHub code is working, read "readme .md" file.

    • @RishikTalksOnAI
      @RishikTalksOnAI Před rokem

      @@ChatGPT-AI ok

  • @parthsinghrajput2475
    @parthsinghrajput2475 Před 9 měsíci

    apis are paid it is showing my limit is reached

  • @TechTe23
    @TechTe23 Před rokem +1

    You are amazing. Thanks.
    Got some error: "Incorrect API Provided"

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      you have to add your own api.

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      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

  • @dirkgoldman1155
    @dirkgoldman1155 Před rokem

    Nice video. What voice ai are you using?

  • @devenrajput5522
    @devenrajput5522 Před 10 měsíci

    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

    • @felixgutierrez2612
      @felixgutierrez2612 Před 3 měsíci

      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

  • @MrAnh-go6rs
    @MrAnh-go6rs Před rokem

    So sad, It not work today "module 'openai' has no attribute 'ChatCompletion'"

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      update to latest version or check docs

  • @jessicagerber423
    @jessicagerber423 Před rokem

    1:49s - Where do you go to start your server?

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      it's command prompt / cmd
      use cmd or Terminal from VS code.

  • @Crisp_Original
    @Crisp_Original Před rokem

    Amazing thank you great! How do i put to website?

  • @awaixasad7937
    @awaixasad7937 Před rokem +1

    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

    • @nicoalfa146
      @nicoalfa146 Před rokem +1

      same thing happens to me too

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      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.)

    • @pokerdev218
      @pokerdev218 Před rokem

      no request is being sent

    • @cordellbreaux9644
      @cordellbreaux9644 Před rokem

      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.

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem +1

      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

  • @Aman_yadav1419
    @Aman_yadav1419 Před rokem +1

    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

  • @welton26
    @welton26 Před rokem

    For me, the chat is bugging, did someone modify the files?

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      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

  • @Anh_AI
    @Anh_AI Před rokem

    this chat bot do not have history understanding context, right?

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      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.

  • @MichaelSongOfficial
    @MichaelSongOfficial Před rokem

    He used GPT to summarize the first-year subjects in uni.

  • @tusharbhavsar1351
    @tusharbhavsar1351 Před rokem

    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'

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      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.

  • @proyt0
    @proyt0 Před rokem

    Can you make Wheel Of Fortune game using ChatGPT?

  • @Theultramadman
    @Theultramadman Před rokem

    You exceeded your current quota, please check your plan and billing details. ?

  • @motivationalqotesyt
    @motivationalqotesyt Před rokem

    not working for me i use linux chrome book chrome os is there any problem sir?

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      upgrade OpenAI module to latest version. (read docs : v 0.27 )
      and API is not free.

  • @sarthaknegi4869
    @sarthaknegi4869 Před rokem

    @ChatGPT-AI bro now it showing 500 internal server eroor when i m going to run it

  • @kiranbhairava2586
    @kiranbhairava2586 Před 8 měsíci

    is there any free chatgpt api's available?

  • @PoojaSinha-ir3rw
    @PoojaSinha-ir3rw Před rokem

    How to use this on wix website

  • @saranraj4555
    @saranraj4555 Před rokem

    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.

  • @ITT59Gamer
    @ITT59Gamer Před rokem

    bruh now there are so many copy on playstore

  • @NIMA_GAPE
    @NIMA_GAPE Před rokem

    Uzbekcha

  • @AyusHKumAr-js6yg
    @AyusHKumAr-js6yg Před 24 dny

    rate limit error

  • @Cookie_360
    @Cookie_360 Před rokem

    Yeah, we are Doomed 😂

  • @VaibhavShewale
    @VaibhavShewale Před rokem +1

    api is not free though if anyone is thinking of doing it

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      they gave me 20 dollar credit for free 🤩 (i don't know why?)

    • @VaibhavShewale
      @VaibhavShewale Před rokem

      @@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!

  • @Ruthrap-dm1ki
    @Ruthrap-dm1ki Před 2 měsíci

    could you pls share the files

  • @ossamamehmood
    @ossamamehmood Před rokem

    Not Working! Unable to get response

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      it's working.
      you have to add your API key.
      also i have updated the code. check GitHub repo.

  • @f1.shortss808
    @f1.shortss808 Před 5 měsíci

    ModuleNotFoundError: No module named 'Flask'

  • @ShivamChaudhary-jn4kw

    How to start a server

  • @ChinazaChukwunweike-td7lm
    @ChinazaChukwunweike-td7lm Před měsícem +2

    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.

  • @agnostic4162
    @agnostic4162 Před rokem

    Sir can you please provide the code

  • @ulfsark1744
    @ulfsark1744 Před rokem +1

    Too fast and unexplained :/

  • @raxitgupta
    @raxitgupta Před rokem

    Please provide the code of this clone.

  • @AiUnboxxed-gy6ef
    @AiUnboxxed-gy6ef Před rokem

    Why don't you just use the chat GPT app? why create a clone of the same thing?

    • @khutsomokono5368
      @khutsomokono5368 Před rokem

      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

  • @technicalgyaan5528
    @technicalgyaan5528 Před rokem

    Can you provide code files?

  • @mihaisavva9660
    @mihaisavva9660 Před 7 měsíci

    Your videos are so brutal, at least take a pause and explain bro

  • @eineatombombe
    @eineatombombe Před rokem

    That's not a clone...

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      how about a AI chat Bot? 🫣

    • @AlexandreXavierG
      @AlexandreXavierG Před rokem

      ​@@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 ?

    • @awaixasad7937
      @awaixasad7937 Před rokem

      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

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem +1

      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

  • @debangadutta4746
    @debangadutta4746 Před 5 dny

    very fast tutorial, not explained enough, not for beginner

  • @nizamuddinsyed
    @nizamuddinsyed Před rokem

    app.py 29line (if completion.choices[0]. message) showing error

    • @ChatGPT-AI
      @ChatGPT-AI  Před rokem

      if it's giving you error then remove if/else and just replace with,
      "return completion.choices[0]. message".

    • @nizamuddinsyed
      @nizamuddinsyed Před rokem

      @@ChatGPT-AI TQ sir

  • @BMEMDSALMANSHAMS
    @BMEMDSALMANSHAMS Před rokem

    openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.