2
0
Fork
You've already forked Python-Flask-Chatbot-Quickstart
1
Use OpenAI API to build a chatbot with a custom system prompt.
  • Python 47.2%
  • HTML 38.4%
  • CSS 11.8%
  • Dockerfile 2.6%
2024年09月30日 12:07:53 +13:00
static add settings page for model and key 2023年07月16日 22:09:59 +12:00
templates use new versions of gpt model 2024年09月15日 10:48:27 +12:00
.env.example initial commit 2023年06月17日 22:49:17 +12:00
.gitignore initial commit 2023年06月17日 22:49:17 +12:00
app.py parse bot response as markdown 2023年07月22日 14:22:22 +12:00
Dockerfile docker support 2024年09月30日 12:07:53 +13:00
LICENSE initial commit 2023年06月17日 22:49:17 +12:00
README.md update readme 2023年06月17日 22:56:41 +12:00
requirements.txt parse bot response as markdown 2023年07月22日 14:22:22 +12:00
Screenshot.png initial commit 2023年06月17日 22:49:17 +12:00

ChatBot Quickstart

This is a minimalist starting point for a chat bot, written in Python. It uses the OpenAI API. Easily edit the system prompt to create a unique AI personality or function.

Screenshot

Setup

  1. If you don’t have Python installed, install it from here.

  2. Clone this repository.

  3. Navigate into the project directory:

    $ cd Python-Flask-Chatbot-Quickstart
    
  4. Create a new virtual environment:

    $ python3 -m venv venv
    $ . venv/bin/activate
    
  5. Install the requirements:

    $ pip install -r requirements.txt
    
  6. Make a copy of the example environment variables file:

    $ cp .env.example .env
    
  7. Add your API key to the newly created .env file.

  8. Tell the AI how to behave by editing the file templates/system_prompt.txt.

  9. Run the app:

    $ flask run
    

You should now be able to access the app at http://localhost:5000! To learn more, check out the Open AI tutorial.