项目作者: ahmadfaizalbh

项目描述 :
Microsoft chatbot build using NLTK-Chatbot and django
高级语言: Python
项目地址: git://github.com/ahmadfaizalbh/Microsoft-chatbot.git
创建时间: 2016-09-05T10:07:44Z
项目社区:https://github.com/ahmadfaizalbh/Microsoft-chatbot

开源协议:MIT License

下载


Microsoft-chatbot

Microsoft chatbot build using NLTK-Chatbot and django

To Running This App in Microsoft Bot Emulator

  1. Download Emulator
  2. Install Emulator
  3. in command prompt
    1. git clone https://github.com/ahmadfaizalbh/Microsoft-chatbot.git
    2. cd Microsoft-chatbot
    3. pip install -r requirements.txt
    4. python manage.py makemigrations
    5. python manage.py migrate
    6. python manage.py runserver
  4. Microsoft-chatbot/bot/settings.py set DEBUG = True
  5. open another command prompt and execute the following
    1. cd Microsoft-chatbot
    2. python manage.py process_tasks
  6. open Emulator
  7. Add an endpoint for your bot with Endpoint url http://localhost:8000/messaging/ and name localhost and save
  8. open chat and start discussing with the bot

To Run This App in Production

  1. Install postgreSQL follow the instruction in page How to install and use postgresql on ubuntu 14.04
  2. in shell prompt run
    1. git clone https://github.com/ahmadfaizalbh/Microsoft-chatbot.git
  3. Go to Azure Portal
  4. Create a microsoft bot - Follow
  5. Generate and then update below lines in Microsoft-chatbot/bot/settings.py
    1. DEBUG = False
    2. APP_CLIENT_ID = `<Microsoft App ID>`
    3. APP_CLIENT_SECRET = `<Microsoft App Secret>`
  6. in Microsoft-chatbot/bot/settings.py also set ALLOWED_HOSTS with list of domain names
  7. create DB chatbot with username app_user and password InfoBotPassword in postgreSQL or change the credential in settings as per your configuration
    1. create database chatbot;
    2. create user app_user with encrypted password 'InfoBotPassword';
    3. grant all privileges on database chatbot to app_user;
  8. in shell prompt run
    1. cd Microsoft-chatbot
    2. pip install -r requirements.txt
    3. python manage.py makemigrations
    4. python manage.py migrate
  9. run python manage.py process_tasks in background (put it in /etc/rc.local with appropriate path to python and manage.py)
  10. configure apache2 config file for this project
  11. install Let’s Encrypt
  12. restart server