A simple ChatGPT frontend in Django using gpt-3.5-turbo model and API

by [Shubham Birmi]

This project uses the new gpt-3.5-turbo model API from OpenAI and a Django webserver to make a simple chatbot frontend to run it locally, consuming your own OpenAI credits by using your API Key.

Currently there are no models, just using the simplicity of Django as a webserver and using the OpenAI API to generate responses from prompts and a simple frontend to interact with the bot.

I've added Bootstrap to the frontend to make it look a bit nicer.

Usage

  1. set OPENAI_API_KEY to your openapi key in openai_django/settings.py.
  2. install venv by typing pip install virtualenv
  3. run venv by typing venv\Scripts\activate in the same directory as myenv folder.
  4. Install the requirements with pip install -r requirements.txt.
  5. Run the server with python manage.py runserver.
  6. Go to http://localhost:8000/ to interact with the bot.