Skip to content

Latest commit

 

History

History
51 lines (28 loc) · 1.85 KB

README.md

File metadata and controls

51 lines (28 loc) · 1.85 KB

Chatbot

A personal chatbot and online assistant developed utilizing the GPT-3 open-source language model.

How it works

Back End

  • Programmed using Python
  • Used Flask as a backend framework to retrieve user input and display chatbot output
  • Integrated MySQL to create a database to store user's messages and the chatbot's responses
  • Integrated OpenAI's GPT-3 open-source language model API using python to generate contextual responses

Front End

  • Programmed using HTML and CSS
  • Used Flask to return HTML and CSS as the web application

How to Run Locally

  1. Clone this repo
  2. Download MySQL Workbench
  3. Run the following in MySQL Workbench to create a database
CREATE DATABASE messages
CREATE TABLE convo (ID int primary key, question VARCHAR(3000), response VARCHAR(3000));
  1. Within MySQL Workbench, connect to the messages database
  2. Edit the convo table to set ID to auto increment and click apply
  3. Generate your own API key from OpenAI and replace it in the code within the getvalue() function
  4. Run python.py
  5. Use browser to connect to http://127.0.0.1:5000/ to interact with chatbot

Disclaimer
As of now, I have implemented GPT-3 as an open-source language model and created a chatbot web application with a frontend and backend using the GPT-3 API. With more time, I would like to look into setting up a suitable deep learning framework with GPT-3.

Program Preview

image