A community-driven python bot that aims to be as simple as possible to serve humans with their everyday tasks

Overview

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.

Buy Me A Coffee Become a Patron!

Demo (Vimeo)

JARVIS on Messenger Demo

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! 😉

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

Modules

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

Name Sample Query Source (w/ Attribution)
anime death note anime Kitsu
book anything you want book Powered by Goodreads
bye goodbye ---
coin flip a coin ---
currency usd to eur rate Fixer.io
dice roll a die ---
dictionary define comfort Words API
fact tell me a fact JARVIS
hello Hi, Jarvis! ---
help What can you do? ---
joke tell me a joke JARVIS
lyrics paradise lyrics Powered by musiXmatch
movie iron man 2 movie plot
music songs by linkin park Spotify
news latest news Powered by NewsAPI
ping ping google.com Is it up?
quote random quote JARVIS
request report a bug
request a feature
---
thanks Thank you! ---
time time in seattle TimeZoneDB API
url shorten google.com
expand http://goo.gl/7aqe
Google URL Shortener
video videos of sia YouTube
weather weather in london Info provided by OpenWeatherMap
wiki wiki html MediaWiki API
xkcd show a random xkcd comic xkcd

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=<> returns the intent of the query.
    http://localhost:5000/search/?q=<> returns the search result of the query.

result

result

  • The "process" endpoint returns what module the system classifies your query e.g. a dictionary query, a song search, etc. Visit the following URLs to understand the output format:
    http://localhost:5000/process/?q=tell%20me%20a%20joke
    http://localhost:5000/process/?q=time%20in%20seattle
    http://localhost:5000/process/?q=convert%2025%20usd%20to%20eur

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

  • The "search" endpoint returns the actual bot output, which you get when you interact with the bot using that query.

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. 😄

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

Comments
  • Roll a die doesn't work

    Roll a die doesn't work

    issue @swapagarwal I have just started working with open source . I opened the link and found this bug as there is no output for the required query!!! How do i fix this??

    Bug 
    opened by Astrophilic 20
  • HTML entities in output

    HTML entities in output

    Query: define a superhero Response: ... in popular children&#39;s and fantasy literature ... Expected: ... in popular children's and fantasy literature ...

    Bug Low-Hanging Fruit 
    opened by swapagarwal 20
  • Add a curated list of jokes

    Add a curated list of jokes

    The API call in the joke module can be prevented by adding a curated list of jokes in the source file itself. Pros:

    • Fewer API calls
    • Curated jokes (only include the ones that tickle your funny bone)
    • No offensive jokes (sometimes the API returns such type of jokes)

    Con:

    • The curation effort (only one time!)
    Improvement help wanted Low-Hanging Fruit 
    opened by swapagarwal 17
  • Movie: Correct Rating

    Movie: Correct Rating

    happyness movie returns Rating = 7.7 This rating is from TMDb: https://www.themoviedb.org/movie/1402-the-pursuit-of-happyness IMDb rating is 8.0 (http://www.imdb.com/title/tt0454921/)

    Options:

    • Rename field "Average Rating" to "TMDb Rating"
    • Retrieve and show IMDb rating
    Bug Low-Hanging Fruit 
    opened by swapagarwal 12
  • Gender-neutral responses

    Gender-neutral responses

    Some messages are gender-specific, like:

    I'm sorry; I'm not sure I understand what you're trying to say sir.
    Try typing "help" or "request"
    

    Can (Should) we make them gender-neutral?

    Question 
    opened by swapagarwal 11
  • Added Caching

    Added Caching

    Caching the responses , which will take only 1-2 seconds instead of 10, and will run instantly on next launch. The responses with headers and cookies will be transparently cached to demo_cache.sqlite database.

    Improvement 
    opened by happyvalentinesdayswati 11
  • Lyrics: Search inside lyrics instead of title

    Lyrics: Search inside lyrics instead of title

    https://github.com/swapagarwal/JARVIS-on-Messenger/blob/master/modules/src/lyrics.py#L12 Reference: https://developer.musixmatch.com/documentation/api-reference/track-search

    Low-Hanging Fruit 
    opened by swapagarwal 10
  • movie module is down

    movie module is down

    The backend API has gone private, and is no longer free. https://www.patreon.com/posts/api-is-going-10743518 Look for an alternative. P.S. It'd be great to have #207 resolved asap, rather than have people report that a module is down in the gitter chatroom! 😅

    Bug 
    opened by swapagarwal 9
  • Add additional requirements for testing in arch linux.

    Add additional requirements for testing in arch linux.

    Hello, I have followed instructions in README/Local developement/Testing page for starting and got two failures when running test. Test in questions are test_pydist and test_keygen.

    I'm using Arch linux 4.8.13-1 and as a substitute for libssl-dev I've installed openssl since there is no libssl-dev.

    This pull request fixes things.

    Suggestion 
    opened by LukaK 8
  • Toss a coin feature

    Toss a coin feature

    Hey, I think it would be nice to have a simple feature where the users can ask JARVIS to toss a coin and it randomly replies either 'Head' or 'Tail'. What do you think of it?

    Suggestion 
    opened by rkrp 8
  • Add error handling

    Add error handling

    Below is the list of modules that need a output['error_msg'] in case of an exception:

    • [x] anime
    • [x] book
    • [x] currency
    • [x] dictionary Line#20
    • [x] movie
    • [x] music
    • [x] time
    • [x] wiki
    Improvement Low-Hanging Fruit 
    opened by swapagarwal 8
  • Update to Python 3

    Update to Python 3

    Short description of what this resolves: This converts the JARVIS chat bot from python2 to python3 compatible.

    Changes proposed in this pull request:

    • Removed unicode characters
    • Updated all library dependencies
    • Updated testing so that it is now compatible

    All tests were able to run locally via pytest, however, assertions were failing due to the fact we were unable to have access to the live API. Otherwise, all syntax is now python3 and is compatible with all libraries.

    Fixes: #536

    opened by abedi01 0
  • some data added to motivations.json

    some data added to motivations.json

    Short description of what this resolves:

    Changes proposed in this pull request:

    I have added some data to data -> motivations.json file

    Fixes: #

    opened by Parag-dwn 0
  • Added chameleon fact

    Added chameleon fact

    Short description of what this resolves:

    added chameleon fact.

    Changes proposed in this pull request:

    • added chameleon fact to facts.json file

    Fixes: #

    opened by sddark 0
  • Added a fact,joke,quote and a motivation

    Added a fact,joke,quote and a motivation

    Short description of what this resolves:

    Added some more information in data

    Changes proposed in this pull request:

    added a -joke -quote -motivation -fact

    Fixes: #

    opened by alwenpy 0
  • Added a new joke

    Added a new joke

    Short description of what this resolves:

    This PR adds a new joke to the repository

    Changes proposed in this pull request:

    The new joke goes "Did you hear about the mathematician who's afraid of negative numbers? He'll stop at nothing to avoid them.

    opened by nabilkoneylaryea 0
Releases(v1.0)
  • v1.0(Apr 20, 2016)

  • v0.2-beta(Apr 20, 2016)

    This is a rule-based module structure that can be extended very easily. Feel free to use it for custom purposes. I'll be moving towards NLP approach now.

    Source code(tar.gz)
    Source code(zip)
Owner
Swapnil Agarwal
Backend Developer at Amazon | Open Source Contributor at Night | Co-Organizer at Vue Bangalore
Swapnil Agarwal
Better GitHub statistics images for your profile, with stats from private and public repos

Better GitHub statistics images for your profile, with stats from private and public repos

Jacob Strieb 2k Dec 30, 2022
Problem 5: Fermat near-misses

Problem 5: Fermat near-misses fermatnearmiss This is a script that computes fermat nearm misses when the -f option is set and requires users to input

CHRIS BYRON (Int0x80) 1 Jan 08, 2022
Python version of RocketLeague-Dropshot-Calculated-shot

Python version of RocketLeague-Dropshot-Calculated-shot. This is just to demo around and a tool I used to develop the actual plugin.

JareBear 1 Jan 14, 2022
A simple and convenient build-and-run system for C and C++.

smake Smake is a simple and convenient build-and-run system for C and C++ projects. Why make another build system? CMake and GNU Make are great build

Venkataram Edavamadathil Sivaram 18 Nov 13, 2022
Library to emulate the Sneakers movie effect

py-sneakers Port to python of the libnms C library To recreate the famous data decryption effect shown in the 1992 film Sneakers. Install pip install

Nicolas Rebagliati 11 Aug 27, 2021
🍞 Create dynamic spreadsheets with arbitrary layouts using Python

🍞 tartine What this is Installation Usage example Fetching some data Getting started Adding a header Linking more cells Cell formatting API reference

Max Halford 11 Apr 16, 2022
Integer sets where all subsets have unique sums

Evil Sums Generation of sets of numbers where all constituents are recoverable from a partial sum.

Charlotte 5 Sep 24, 2022
my own python useful functions

PythonToolKit Motivation This Repo should help save time for data scientists' daily work regarding the Time Series regression task by providing functi

Kai 2 Oct 01, 2022
Google Foobar challenge solutions from my experience and other's on the web.

Google Foobar challenge Google Foobar challenge solutions from my experience and other's on the web. Note: Problems indicated with "Mine" are tested a

Islam Ayman 6 Jan 20, 2022
Advanced IPv4 Subnet Calculator in Python3

Advanced IPv4 Subnet Calculator in Python3 Table of Contents Getting Started Installation How it works? SVI Configuration Template Previews Getting St

Osama Abbas 1 May 10, 2022
WhyNotWin11 - Detection Script to help identify why your PC isn't Windows 11 Release Ready

WhyNotWin11 - Detection Script to help identify why your PC isn't Windows 11 Release Ready

Robert C. Maehl 5.9k Dec 31, 2022
Combines power of torch, numerical methods to conquer and solve ALL {O,P}DEs

torch_DE_solver Combines power of torch, numerical methods and math overall to conquer and solve ALL {O,P}DEs There are three examples to provide a li

Natural Systems Simulation Lab 28 Dec 12, 2022
UFDR2DIR - A script to convert a Cellebrite UFDR to the original file structure

UFDR2DIR A script to convert a Cellebrite UFDR to it's original file and directo

DFIRScience 25 Oct 24, 2022
Hashcrack: Hash Bruteforse tool using python

HashCrack Hash Bruteforse tool Usage hashcrack.py -n 6 -c lower -l 5 -a md5 -t 3

Lev 1 May 04, 2022
Prints values and types during compilation!

Compile-Time Printer Compile-Time Printer prints values and types at compile-time in C++. Teaser test.cpp compile-time-printer

43 Dec 26, 2022
A faster copy of nell's comet nuker

Astro a faster copy of nell's comet nuker also nell uses external libraries like it's cocaine man never learned to use ansi color codes (ily nell) (On

horrid 8 Aug 15, 2022
An integrated library for checking email if it is registered on social media

An integrated library for checking email if it is registered on social media

Sidra ELEzz 13 Dec 08, 2022
Airplane reservation system python 2

airplane-reservation-system-python-2 Announcement 🔊 : 🔴 IMPORTANT 🔴 : Few new things have been added into the code [16/05/2021] different names is

voyager2005 1 Dec 06, 2021
A simple chatbot that I made for school project

Chatbot: Python A simple chatbot that I made for school Project. Tho this chatbot is dumb sometimes, but it's not too bad lol. Check it Out! FAQ How t

Prashant 2 Nov 13, 2021
python DroneCAN code generation, interface and utilities

UAVCAN v0 stack in Python Python implementation of the UAVCAN v0 protocol stack. UAVCAN is a lightweight protocol designed for reliable communication

DroneCAN 11 Dec 12, 2022