A personal chatbot and online assistant developed utilizing the GPT-3 open-source language model.
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
- Clone this repo
- Download MySQL Workbench
- 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));
- Within MySQL Workbench, connect to the
messages
database - Edit the convo table to set ID to auto increment and click apply
- Generate your own API key from OpenAI and replace it in the code within the
getvalue()
function - Run
python.py
- 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.