Django chatbot web app baseline
-
Clone the repository
-
Install the requirements
pip install -r requirements.txt
- Create a
.env
file in the root directory and add the following environment variables
SECRET_KEY="given_secret_key"
OPENAI_API_KEY="your_openai_api_key"
- Create the database
python manage.py makemigrations
python manage.py migrate
- Create a superuser
python manage.py createsuperuser
- Run the server
python manage.py runserver
-
Create a chatbot profile
- Go to
localhost:8000/admin
- Log in with the superuser credentials
- Click Profiles -> ADD PROFILE
- Fill the chatbot name and specify profile image (DO NOT select the User field)
- Hit SAVE
- Go to
-
Point created chatbot profile on bot configuration
- Go to
localhost:8000/admin
- Log in with the superuser credentials
- Click Bot configurations -> ADD BOT CONFIGURATION
- Select the chatbot profile created in step 7 for Bot profile field
- Hit SAVE
- Go to
-
Enjoy