Home

Awesome

JARVIS on Messenger

Just A Rather Very Intelligent System, now on Messenger!

Build Status Python PEP8 Gitmoji License Gitter Contributors Beginner Issues Pull Requests Closed

Messenger is now used by 1.2 billion people every month. With the launch of Send/Receive API, bots are about to take over.

Usage

JARVIS is at your service here.

<a href="https://www.buymeacoffee.com/swap" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a> <a href="https://www.patreon.com/bePatron?u=7999565" target="_blank"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Become a Patron!" height="41"></a>

Demo (Vimeo)

<a href="https://vimeo.com/226022581" target="_blank" title="Click to open Vimeo link"> <img src="https://i.vimeocdn.com/video/645512677_640.jpg" alt="JARVIS on Messenger Demo" width="300"> </a>

Why?

I created JARVIS with two goals in mind:

  1. It should have a lot of useful features (both fun and commonly used).
  2. Anyone can contribute to this project. (As this is module-based, anybody with a decent knowledge of Python can contribute.) One of the prime goals of this project is to lower the entry barrier into the world of open source.

Take a look at the contributing guidelines to see how easy it is to add your own code. I'll be waiting for your pull request! :wink:

A massive Thank You to all contributors, and congratulations to people who made their first open-source contribution! :tada:

Modules

Feel free to add to this list by opening an Issue/Pull Request.

NameSample QuerySource (w/ Attribution)
animedeath note animeKitsu
bookanything you want bookPowered by Goodreads
byegoodbye---
coinflip a coin---
currencyusd to eur rateFixer.io
diceroll a die---
dictionarydefine comfortWords API
facttell me a factJARVIS
helloHi, Jarvis!---
helpWhat can you do?---
joketell me a jokeJARVIS
lyricsparadise lyricsPowered by musiXmatch
movieiron man 2 movie plot<img src="/images/powered_by_tmdb.png"/>
musicsongs by linkin parkSpotify
newslatest newsPowered by NewsAPI
pingping google.comIs it up?
quoterandom quoteJARVIS
requestreport a bug <br> request a feature---
thanksThank you!---
timetime in seattleTimeZoneDB API
urlshorten google.com <br> expand http://goo.gl/7aqeGoogle URL Shortener
videovideos of siaYouTube
weatherweather in londonInfo provided by OpenWeatherMap
wikiwiki htmlMediaWiki API
xkcdshow a random xkcd comicxkcd

More sample queries can be found here.

Structure

├── modules/         # home for various features
├── modules/src/     # code goes here
├── modules/tests/   # tests go here
├── data/            # home for shared data
├── templates/       # for sending structured messages
├── CONTRIBUTING.md  # contributing guidelines
└── jarvis.py        # the main bot

Local Development / Testing

  1. Clone this repo.
  2. Linux:
    a) Debian (Ubuntu, Linux Mint, etc.): sudo apt-get install python-dev libffi-dev libssl-dev
    b) Arch Linux: sudo pacman -S python2 libffi openssl
    c) Fedora: sudo yum install python-devel libffi-devel openssl-devel
    Windows: These should already be pre-installed in your Python bundle.
    Mac/OS X:
    a) If you install Python using brew, the relevant headers are already installed for you. In other words, you don't need python-devel.
    b) brew install pkg-config libffi
    export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/ # May change with libffi version
    pip install cffi
    c) brew install libtins
  3. pip install -r requirements.txt
  4. python jarvis.py
  5. Visit the following URLs to see results:
    http://localhost:5000/process/?q=<<YOUR_QUERY>> returns the intent of the query.
    http://localhost:5000/search/?q=<<YOUR_QUERY>> returns the search result of the query.

result

result

You can mock the results for local testing by adding your queries here.

Note that for the search query to work, you have to set your own key (of the module that you want to test) in config.py

If you want a public endpoint, use the below button to deploy on Heroku and fill the relevant API keys that you would like to use:

Deploy

TL;DR for Beginners

  1. J.A.R.V.I.S. runs on Python 2
  2. For the search query to work, you have to set your own key (of the module that you want to test) in config.py
  3. The best place to ask anything: https://gitter.im/swapagarwal/JARVIS-on-Messenger
  4. Some issues are reserved for you! https://github.com/swapagarwal/JARVIS-on-Messenger/labels/Low-Hanging%20Fruit
  5. If you're working on something, let everyone know by either creating an issue or commenting on an existing one so that work is not duplicated.
  6. Prefer using an IDE (Use PyCharm if you don't have any preference yet)

History

I started out with a rule-based model, but it didn't scale well so now I've shifted to Natural Language Processing. Rest assured, I'll strive to keep it as simple as possible so that you, yes you, can contribute!

If you'd like to contribute to the old model, you are welcome to do so as well. I've created a new branch legacy for this purpose. I'll be accepting Pull Requests to this branch also. :smile:

P.S. If you've come this far, you might as well contribute. Looking for a place to start? Take a look at some of the low-hanging fruits!

References