GentleLemon / ChatGPT-Django

使用阿里云轻量级服务器+Django+Nginx+gpt-3.5-turbo开发一个ChatGPT前端

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ChatGPT-Django

使用openai + Django + Nginx开发一个web前端

by GentleLemon 示例 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. Make sure you have a working account on OpenAI and have created an API key. Save it.
  2. Add the API key to the OPENAI_API_KEY environment variable. vi .env
  3. Install the requirements with pip install -r requirements.txt or alternatively create a virtual environment and install the requirements there. Make sure the environment variable is present in the virtual environment.
  4. Run the server with python manage.py runserver.
  5. Go to http://127.0.0.1:8000/ to interact with the bot.

Please contact me for Alibaba Cloud deployment.

  • 云部署请联系我

peixiaong@outlook.com

About

使用阿里云轻量级服务器+Django+Nginx+gpt-3.5-turbo开发一个ChatGPT前端

License:GNU General Public License v3.0


Languages

Language:Python 65.8%Language:HTML 34.2%