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
mrcal is a generic toolkit to solve calibration and SFM-like problems originating at NASA/JPL

mrcal is a generic toolkit to solve calibration and SFM-like problems originating at NASA/JPL. Functionality related to these problems is exposed as a set of C and Python libraries and some commandli

Dima Kogan 102 Dec 23, 2022
Just messing around with AI for fun coding 😂

Python-AI Projects 🤖 World Clock ⏰ ⚙︎ Steps to run world-clock.py file Download and open the file in your Python IDE. Run the file a type the name of

Danish Saleem 0 Feb 10, 2022
A collection of daily usage utility scripts in python. Helps in automation of day to day repetitive tasks.

Kush's Utils Tool is my personal collection of scripts which is used to automated daily tasks. It is a evergrowing collection of scripts and will continue to evolve till the day I program. This is al

Kushagra 10 Jan 16, 2022
A random cat fact python module

A random cat fact python module

Fayas Noushad 4 Nov 28, 2021
Process GPX files (adding sensor metrics, uploading to InfluxDB, etc.) exported from imxingzhe.com

Xingzhe GPX Processor 行者轨迹处理工具 Xingzhe sells cheap GPS bike meters with sensor support including cadence, heart rate and power. But the GPX files expo

Shengqi Chen 8 Sep 23, 2022
Comprehensive OpenAPI schema generator for Django based on pydantic

🗡️ Djagger Automated OpenAPI documentation generator for Django. Djagger helps you generate a complete and comprehensive API documentation of your Dj

13 Nov 26, 2022
Build your own Etherscan with web3.py

Build your own Etherscan with web3.py Video Tutorial: Run it pip3 install -r requirements.txt export FLASK_APP=app export FLASK_ENV=development flask

35 Jan 02, 2023
A place where one-off ideas/partial projects can live comfortably

A place to post ideas, partial projects, or anything else that doesn't necessarily warrant its own repo, from my mind to the web.

Carson Scott 2 Feb 25, 2022
A pypi package details search python module

A pypi package details search python module

Fayas Noushad 5 Nov 30, 2021
NeoInterface - Neo4j made easy for Python programmers!

Neointerface - Neo4j made easy for Python programmers! A Python interface to use the Neo4j graph database, and simplify its use. class NeoInterface: C

15 Dec 15, 2022
Repo to demo translating colab/jupyter notebook to streamlit webapp

Repo to demo translating colab/jupyter notebook to streamlit webapp

Marisa Smith 2 Feb 02, 2022
Clackety Keyboards Powered by Python

KMK: Clackety Keyboards Powered by Python KMK is a feature-rich and beginner-friendly firmware for computer keyboards written and configured in Circui

KMK Firmware 780 Jan 03, 2023
The-White-Noise-Project - The project creates noise intentionally

The-White-Noise-Project High quality audio matters everywhere, even in noise. Be

Ali Hakim Taşkıran 1 Jan 02, 2022
The FLARE team's open-source library to disassemble Common Intermediate Language (CIL) instructions.

dncil is a Common Intermediate Language (CIL) disassembly library written in Python that supports parsing the header, instructions, and exception hand

MANDIANT 95 Jan 08, 2023
This is a repository containing the backend and the frontend of a simple pokédex.

Pokémon This is a repository containing the backend and the frontend of a simple pokédex. This is a work in progress project! Project Structure 🗂 pok

André Rato 1 Nov 28, 2021
Materials for the Introduction in Python , Linux , Git and Github

This repository contains all the materials of the presentation on the introduction of python, linux, git and Github.

AMMI 3 Aug 28, 2022
Blender-miHoYo-Shaders - Shaders for Blender attempting to replicate the shading of games developed by miHoYo

Blender-miHoYo-Shaders - Shaders for Blender attempting to replicate the shading of games developed by miHoYo

Matsuri 449 Jan 07, 2023
Malicious Document IoC Extractor is a collection of scripts that helps extracting IoCs from various maldoc families.

MDIExtractor Malicious Document IoC Extractor (MDIExtractor) is a collection of scripts that helps extracting IoCs from various maldoc families. Prere

Malwrologist 14 Nov 25, 2022
Snek-test - An operating system kernel made in python and assembly

pythonOS An operating system kernel made in python and assembly Wait what? It us

TechStudent10 2 Jan 25, 2022
App and Python library for parsing, writing, and validation of the STAND013 file format.

python-stand013 python-stand013 is a Python app and library for parsing, writing, and validation of the STAND013 file format. Features The following i

Oda 3 Nov 09, 2022