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
Given tool find related trending keywords of input keyword

blog_generator Given tool find related trending keywords of input keyword (blog_related_to_keyword). Then cretes a mini blog. Currently its customised

Shivanshu Srivastava 2 Nov 30, 2021
Tethered downgrade 64-bit iDevices vulnerable to checkm8

ra1nstorm Tethered downgrade 64-bit iDevices vulnerable to checkm8 Since the purpose of this tool is to tethered downgrade a device, after restoring p

mini_exploit 65 Nov 08, 2022
A program to generate random numbers b/w 0 to 10 using time

random-num-using-time A program to generate random numbers b/w 0 to 10 using time it uses python's in-built module datetime and an equation which retu

Atul Kushwaha 1 Oct 01, 2022
A tool to assist in code raiding in rust

Kodelock a tool to assist in code raiding in rust This tool is designed to be used on a second monitor. This tools will allow you to see a easily read

3 Oct 27, 2022
1. 네이버 카페 댓글을 빨리 다는 기능

naver_autoprogram 기능 설명 네이버 카페 댓글을 빨리 다는 기능 네이버 카페 자동 출석 체크 기능 동작 방식 카페 댓글 기능 기본 동작은 주기적인 스케쥴 동작으로 해당 카페 ID 와 특정 API 주소로 대상이 새글을 작성했는지 체크. 해당 대상이 새글 등

1 Dec 22, 2021
Python Interactive Graphical System made during Computer Graphics classes (INE5420-2021.1)

PY-IGS - The PYthon Interactive Graphical System The PY-IGS Installation To install this software you will need these dependencies (with their thevelo

Enzo Coelho Albornoz 4 Dec 03, 2021
Step by step development of a vending coffee machine project, including tkinter, sqlite3, simulation, etc.

Step by step development of a vending coffee machine project, including tkinter, sqlite3, simulation, etc.

Nikolaos Avouris 2 Dec 05, 2021
Get you an ultimate lexer generator using Fable; port OCaml sedlex to FSharp, Python and more!

NOTE: currently we support interpreted mode and Python source code generation. It's EASY to compile compiled_unit into source code for C#, F# and othe

Taine Zhao 15 Aug 06, 2022
Tools for collecting social media data around focal events

Social Media Focal Events The focalevents codebase provides tools for organizing data collected around focal events on social media. It is often diffi

Ryan Gallagher 80 Nov 28, 2022
A toy repo illustrating a minimal installable Python package

MyToy: a minimal Python package This repository contains a minimal, toy Python package with a few files as illustration for students of how to lay out

Fernando Perez 19 Apr 24, 2022
apysc is the Python frontend library to create html and js file, that has ActionScript 3 (as3)-like interface.

apysc apysc is the Python frontend library to create HTML and js files, that has ActionScript 3 (as3)-like interface. Notes: Currently developing and

simonritchie 17 Dec 14, 2022
SuperMario - Python programming class ending assignment SuperMario, using pygame

SuperMario - Python programming class ending assignment SuperMario, using pygame

mars 2 Jan 04, 2022
This is a Docker-based pipeline for preparing sextractor-ready multiwavelength images

Pipeline for creating NB422-detected (ODI) catalog The repository contains a Docker-based pipeline for preprocessing observational data. The pipeline

1 Sep 01, 2022
Diff Match Patch is a high-performance library in multiple languages that manipulates plain text.

The Diff Match and Patch libraries offer robust algorithms to perform the operations required for synchronizing plain text. Diff: Compare two blocks o

Google 5.9k Dec 30, 2022
Shell scripts made simple 🐚

zxpy Shell scripts made simple 🐚 Inspired by Google's zx, but made much simpler and more accessible using Python. Rationale Bash is cool, and it's ex

Tushar Sadhwani 492 Dec 27, 2022
MIB2 STD ZR Firmware Upgrade

Upgrade MIB2 STD ZR Firmware (without Navigation) About This repository contains some scripts and documentation how to upgrade the MIB2 firmware to a

Fabian 18 Dec 29, 2022
NotesToCommands - a fully customizable notes / command template program, allowing users to instantly execute terminal commands

NotesToCommands is a fully customizable notes / command template program, allowing users to instantly execute terminal commands with dynamic arguments grouped into sections in their notes/files. It w

zxro 5 Jul 02, 2022
YourX: URL Clusterer With Python

YourX | URL Clusterer Screenshots Instructions for running Install requirements

ARPSyndicate 1 Mar 11, 2022
Batch obfuscator based on the obfuscation method used by the trick bot launcher

Batch obfuscator based on the obfuscation method used by the trick bot launcher

SlizBinksman 2 Mar 19, 2022
Service for working with open data of the State Duma of the Russian Federation

Сервис для работы с открытыми данными Госдумы РФ Исходные данные из API Госдумы РФ извлекаются с помощью Apache Nifi и приземляются в хранилище Clickh

Aleksandr Sergeenko 2 Feb 14, 2022