/Chatbot-Using-OpenAI-API

Create your ChatBot using OpenAI API (ChatGPT). Enter your API Key and Run Single File. Structured and Commented Code for Ease. Also added WebApp Template for Reference!

Primary LanguageHTMLMIT LicenseMIT

ChatBot using OpenAI (ChatGPT) API (with GUI)

Ready to Use Code to have your own ChatBot using OpenAI API.
Also added WebApp Template for Reference! Thanks to Lyubomir

Steps to Use the ChatBot:

  • This Codebase requires OpenAI API Key, kindly make sure you get one.
  • Install Necessary Dependencies from 'requirements.txt'.
    • Run : pip install -r requirements.txt
  • Open and Store your API Key in "Code/BotDefinition.py".
  • Run "Code/ChatBot.py" for Terminal Based ChatBot.
  • Run "Code/GuiChatBot.py" for WebApp Based ChatBot.
  • That's it! Just enter your prompts and get the responses.
  • If you want to terminate the chat, just enter 'End Chat'.

How to get the Best out of this Piece of Code:

  • Use it in Terminal/CMD for quick response.
  • Use it in Jupyter Notebook / Google Colab for more interactive and complex prompts.
  • Use it in the BackEnd of any WebApp for enhanced functionality.
  • Whatever and However you wish to use it!

Here is a Sample of How it Works in the Terminal:

Sample in Terminal