A light-weight project that demonstrates pre-programmed chatbot by utilizing the GPT3.5 Turbo model and Chat Completions.
- Clone reporsitory.
$ git clone https://github.com/kitimi88/flask-gpt-demo.git
- Setup virtual environment.
$ py -m venv .venv
$ .venv\scripts\activate
- Install required dependecies.
$ py -m pip install -r requirements.txt
- Make a copy of the example environment variables file:
$ cp .env.example .env
-
Add your API key to the newly created
.env
file. -
Run app:
$ flask run
Alternatively, use the following command if you want to connect the Flask dev server from other devices on the same network:
$ flask run --host=<your-local-ip> --port=5000
IMPORTANT - By default, this project is powered by gpt-3.5-turbo-16k model. Feel free to adjust according to your preferred model in the gpt.py.
$ GPT_MODEL = "your-preferred-gpt-model"
Supports color modes or themes using Bootstrap 5.3.
Pending contribution guide.
Check out my other respository for more python projects.