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
bamboo-engine 是一个通用的流程引擎,他可以解析,执行,调度由用户创建的流程任务,并提供了如暂停,撤销,跳过,强制失败,重试和重入等等灵活的控制能力和并行、子流程等进阶特性,并可通过水平扩展来进一步提升任务的并发处理能力。

bamboo-engine 是一个通用的流程引擎,他可以解析,执行,调度由用户创建的流程任务,并提供了如暂停,撤销,跳过,强制失败,重试和重入等等灵活的控制能力和并行、子流程等进阶特性,并可通过水平扩展来进一步提升任务的并发处理能力。 整体设计 Quick start 1. 安装依赖 2. 项目初始

腾讯蓝鲸 96 Dec 15, 2022
log4shell pwner for vulnerable minecraft servers

Log4-hell name supposed to be Log4$hell but oh well log4shell pwner for vulnerable minecraft servers install all reqs python + a minecraft client for

1 Jan 05, 2022
A software dedicated to automaticaly select the agent of your desire in Valorant

AUTOPICKER A software dedicated to automaticaly select the agent of your desire in Valorant GUIDE Before stariting to use this program check if you ha

p1n00 0 Sep 24, 2022
For radiometrically calibrating and PSF deconvolving IRIS data

irispreppy For radiometrically calibrating and PSF deconvolving IRIS data. I dislike how I need to own proprietary software (IDL) just to simply prepa

Aaron W. Peat 4 Nov 01, 2022
A prototype COG-based tile server for sparse Mars datasets

Mars tiler Mars Tiler is a prototype web application that serves tiles from cloud-optimized GeoTIFFs, with an emphasis on supporting planetary dataset

Daven Quinn 3 Mar 23, 2022
Iris-client - Python client for DFIR-IRIS

Python client dfir_iris_client offers a Python interface to communicate with IRI

DFIR-IRIS 11 Dec 22, 2022
This is the course repository for the Spring 2022 iteration of MACS 30123 "Large-Scale Computing for the Social Sciences" at the University of Chicago.

Large-Scale Computing for the Social Sciences Spring 2022 - MACS 30123/MAPS 30123/PLSC 30123 Instructor Information TA Information TA Information Cour

6 May 06, 2022
Demo of a WAM Prolog implementation in Python

Prol: WAM demo This is a simplified Warren Abstract Machine (WAM) implementation for Prolog, that showcases the main instructions, compiling, register

Bruno Kim Medeiros Cesar 62 Dec 26, 2022
💡 Fully automatic light management based on conditions like motion, illuminance, humidity, and other clever features

Fully automatic light management based on motion as AppDaemon app. 🕓 multiple daytimes to define different scenes for morning, noon, ... 💡 supports

Ben 105 Dec 23, 2022
The RAP community of practice includes all analysts and data scientists who are interested in adopting the working practices included in reproducible analytical pipelines (RAP) at NHS Digital.

The RAP community of practice includes all analysts and data scientists who are interested in adopting the working practices included in reproducible analytical pipelines (RAP) at NHS Digital.

NHS Digital 50 Dec 22, 2022
Backend/API for the Mumble.dev, an open source social media application.

Welcome to the Mumble Api Repository Getting Started If you are trying to use this project for the first time, you can get up and running by following

Dennis Ivy 189 Dec 27, 2022
urlwatch is intended to help you watch changes in webpages and get notified of any changes.

urlwatch is intended to help you watch changes in webpages and get notified (via e-mail, in your terminal or through various third party services) of any changes.

Thomas Perl 2.5k Jan 08, 2023
Timetable scripts for python

Timetable Scripts timetable_to_json: https://beta.elektronplus.pl/timetable classes_taught_by_teacher: a.adam (aa) ['1Tc', '1Td', '3Te', '3Ti', '4Tf',

Elektron++ 2 Jan 02, 2022
Job Guy Backend

جاب‌گای چیست؟ اونجا وضعیت چطوریه؟ یه سوال به همین کلیت و ابهام معمولا وقتی برای یه شرکت رزومه می‌فرستیم این سوال کلی و بزرگ برای همه پیش میاد.اونجا وض

Jobguy.work 217 Dec 25, 2022
A Google sheet which keeps track of the locations that want to visit and a price cutoff

FlightDeals Here's how the program works. First, I have a Google sheet which keeps track of the locations that I want to visit and a price cutoff. It

Lynne Munini 5 Nov 21, 2022
A Way to Use Python, Easier.

PyTools A Way to Use Python, Easier. How to Install Just copy this code, then make a new file in your project directory called PyTools.py, then paste

Kamran 2 Aug 15, 2022
Python bilgilerimi eğlenceli bir şekilde hatırlamak ve daha da geliştirmek için The Big Book of Small Python Projects isimli bir kitap almıştım.

Python bilgilerimi eğlenceli bir şekilde hatırlamak ve daha da geliştirmek için The Big Book of Small Python Projects isimli bir kitap almıştım. Bu repo kitaptaki örnek programları çalıştığım oyun al

Burak Selim Senyurt 22 Oct 26, 2022
Werkzeug has a debug console that requires a pin. It's possible to bypass this with an LFI vulnerability or use it as a local privilege escalation vector.

Werkzeug Debug Console Pin Bypass Werkzeug has a debug console that requires a pin by default. It's possible to bypass this with an LFI vulnerability

Wyatt Dahlenburg 23 Dec 17, 2022
Repo with data from local elections in Portugal from 2009 to 2013

autarquicas - local elections in Portugal Repo with data from local elections in Portugal from 2009 to 2013 Objective To provide, to all, raw data fro

Jorge Gomes 6 Apr 06, 2022
This repo houses the qhub frontend moving forward.

This repo houses the qhub frontend moving forward. This effort will house a backend written in fastAPI, and a fronend in Vue, with additional components.

Quansight 1 Feb 10, 2021