GithubHelp home page GithubHelp logo

vinitraj10 / chatbot Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 6.0 4.86 MB

A messenger chatbot using wit-ai and django you can see the demo on youtube..

Home Page: https://www.youtube.com/watch?v=u_FewCSp3wo

License: MIT License

Python 100.00%
wit-api witai python django rest-api chatbot chat-application messenger-bot facebook-messenger-bot

chatbot's Introduction

Facebook-messenger-bot

This is a messenger(facebook) chat bot which can greet users and give the weather reports for now,But I will try to add more feautres into it.You can also make your own custom chatbot by using this project and customize the functionality as per your needs.
As a beginner I Know it's tough to think that how do we make chatbots,but now a days it's really easy to make chatbots,The only thing that we have to do is "Use the Resources wisely!!".So follow this documentation and you can make your own working chatbots in an hour!!

Overview:-

Setup the project:-


First create the virtualenv in any Location:-
> virtualenv chatbotenv

Clone this project in same location where your virtualenv exists:-

> git clone https://github.com/vinitraj10/chatbot

Start the virtualenv:-

>chatbotenv\scripts\activate

Open project in virtualenv and install requirements:-

>cd Facebook-messenger-bot
>pip install -r requirements.txt

Now Go to Wit and signup,create your app and follow there docs to give intents to your wit app. Or if you want my app configuration you can contact me. So take your wit key and update in your views.py

Now go to fbchatbot>views.py:- Give some random integer value in place of <verify_token> that will be required for setting up the webhooks

def fbchat(request):
	if request.method == 'GET':
		if request.GET['hub.verify_token'] == <verify_token>:
			return HttpResponse(request.GET['hub.challenge'])
		else:
			return HttpResponse("Error,invalid token")

Download Ngrok for your machine after unzipping the download file you will get ngrok.exe place this exe file to your root folder and run the following commnad.

>python manage.py runserver
>ngrok http 8000

you will get some abcd.ngrok.io link for your app ,after that go to settings.py file and update ALLOWED_HOSTS:-

ALLOWED_HOSTS = ['abcd.ngrok.io']

Now follow this link to setup your webhook Quick start Just make sure you give your ssl certified ngrok url (https://) to callback url and verify token should be equal to that verify token which you have given in views.py file,Get your page access token and substitute it in views.py file wherever it has been used and also make sure you subscribe the app to the page According to official docs.

USEFULL LINKS:-

chatbot's People

Contributors

rahulrj18 avatar vinit1096 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

chatbot's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.