How to use ChatGPT API Python for Beginners – Full ChatBOT Tutorial



In this video, we’ll learn to build a ChatBOT using Python with ChatGPT API from OpenAI

1. Learn how to get OpenAI Key Token
2. Two different methods of using ChatGPT API in Python
3. Building a Python ChatGPT ChatBOT with openai Python package
4. Using ChatGPT API Completions End point
5. How to change ChatGPT API Parameters like temperature
6. Summary

Code and Demo – https://github.com/amrrs/chatgpt-api-python

❤️ If you want to support the channel ❤️
Support here:
Patreon – https://www.patreon.com/1littlecoder/
Ko-Fi – https://ko-fi.com/1littlecoder

43 comments
  1. Hi there! Thanks for the video, its been very helpful, currently using it in a project im working on. I was wondering if you could tell me if paying for the api key gives faster response times… for chatgpt api? Would appreciate your response. At the moment im using the free trial.

  2. This is really good. Thanks so much for the thorough explanation. A question that perhaps you have already answered.

    Is there a way to fine tuned CHAT gpt let's say from content or text you have created? Like your thesis or something?

    Thanks

  3. Thanks for the excellent video. However, I was able to install openai on Google Colab, but when I try to set the key, it gives me errors.

    NameError Traceback (most recent call last)

    <ipython-input-6-f5912bef3725> in <module>
    —-> 1 openai.api_key = 'sk-…'

    NameError: name 'openai' is not defined

  4. When i use free version of Open AI chat GPT then they display an error. RateLimitError: You exceeded your current quota, please check your plan and billing details. Let me know we will create a chatbot with premium version of chatgpt?

  5. I've never used this API before, but even so I'm getting the message :"You exceeded your current quota, please check your plan and billing details."
    Somebody had this issue?

  6. This is amazing. I want to do this but slightly different. Im trying to get the AI to become an NPC complete with a backstory and rules of engagement with players. do you have any advice to add about 5 pages worth of backstory?

  7. Excellent video as always. A few things I』m curious about though, using the API endpoint how would you retain chat history like you did using the While True loop? Also if building an application for multiple users how would you do it in such a way that the ChatGPTs memory is specific to a certain user?

  8. This is great! Would love to know how to chain API calls for Whisper and GPT together:

    For example:
    A Ui where a user speaks, whisper transcribers what they say , then their transcription is summarized/interpreted with a pre-made GPT prompt, and the user can see the summarized/remixed output?

  9. Thank you so much for putting this together! — Very helpful!
    One noob question: is it possible at this point of time to train chatGPT on your own data using their API?

  10. Using requests module, how do you reference a particular chat. Say the conversation about Gary Kasparov vs about something else? I saw there's a chat ID in the json response. How do you reference that?

  11. You are Always on the tip of this spear! 👌 👍 Look forward to your next gangbuster vid?
    How about a Mashup between this newAPI and ControlNet!
    Thoughts?

  12. Thank you so much, your tutorials are so helpful. Can you pls make a tutorial on how to fine tune this model. Let's say i want to provide the model with several documents. I want it to learn from it so that i can do QA on it.

Comments are closed.