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
30DaysOfCode-PhoenixClub - Solution of everyday coding problem given in 30DaysofCode contest held on Hackerrank

30DaysOfCode-PhoenixClub ??‍?? Every day problems solution given in 30DaysOfCode

Urveshkumar 8 Jan 30, 2022
Python project that aims to discover CDP neighbors and map their Layer-2 topology within a shareable medium like Visio or Draw.io.

Python project that aims to discover CDP neighbors and map their Layer-2 topology within a shareable medium like Visio or Draw.io.

null 3 Feb 11, 2022
A Python application that helps users determine their calorie intake, and automatically generates customized weekly meal and workout plans based on metrics computed using their physical parameters

A Python application that helps users determine their calorie intake, and automatically generates customized weekly meal and workout plans based on metrics computed using their physical parameters

Anam Iqbal 1 Jan 13, 2022
A tool to allow New World players to calculate the best place to put their Attribute Points for their build and level

New World Damage Simulator A tool designed to take a characters base stats including armor and weapons, level, and base damage of their items (slash d

Joseph P Langford 31 Nov 1, 2022
A collection of software that serve no purpose other than waste your time. Forking is encouraged!

the-useless-collection A collection of software that serve no purpose other than waste your time. Forking is encouraged! Requires Python 3.9. Usage Go

Imsad2 1 Mar 16, 2022
A web interface for a soft serve Git server.

Soft Serve monitor Soft Sevre is a very nice git server. It offers a really nice TUI to browse the repositories on the server. Unfortunately, it does

Maxime Bouillot 5 Apr 26, 2022
A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz

A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz has some issues building with python 3.10

null 4 Jan 1, 2022
YunoHost is an operating system aiming to simplify as much as possible the administration of a server.

YunoHost is an operating system aiming to simplify as much as possible the administration of a server. This repository corresponds to the core code, written mostly in Python and Bash.

YunoHost 1.5k Jan 9, 2023
frida-based ceserver. iOS analysis is possible with Cheat Engine.

frida-ceserver frida-based ceserver. iOS analysis is possible with Cheat Engine. Original by Dark Byte. Usage Install frida on iOS. python main.py Cyd

KenjiroIchise 89 Jan 8, 2023
This is a modified variation of abhiTronix's vidgear. In this variation, it is possible to write the output file anywhere regardless the permissions.

Info In order to download this package: Windows 10: Press Windows+S, Type PowerShell (cmd in older versions) and hit enter, Type pip install vidgear_n

Ege Akman 3 Jan 30, 2022
A Powerful Tool For Making Combo List(All possible modes)

ComboMaker A Powerful Tool For Making Combo List Introduction Check out all possible Combo list build modes with this tool =) How to Install Open the

MasterBurnt 7 Jan 7, 2023
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
An interactive tool with which to explore the possible imaging performance of candidate ngEHT architectures.

ngEHTexplorer An interactive tool with which to explore the possible imaging performance of candidate ngEHT architectures. Welcome! ngEHTexplorer is a

Avery Broderick 7 Jan 28, 2022
combs is a package used to generate all possible combinations of a given length k on a given set.

The package combs is a package used to generate all possible combinations of a given length k on a given set. The set is given as a list, and k must b

null 1 Dec 24, 2021
Possible solutions to Wordscapes, a mobile game for the android operating system, downloadable from the play store

Possible solutions to Wordscapes, a mobile game for the android operating system, downloadable from the play store

Clifford Onyonka 2 Feb 23, 2022
This is a Poetry plugin that will make it possible to build projects using custom TOML files

Poetry Multiproject Plugin This is a Poetry plugin that will make it possible to build projects using custom TOML files. This is especially useful whe

David Vujic 69 Dec 25, 2022
TimeWizard - A script that generates every single Time Wizard EDOPRO lflist possible

EDOPRO F&L list generator This project is just a script that generates every sin

Diamond Dude 2 Sep 28, 2022
redun aims to be a more expressive and efficient workflow framework

redun yet another redundant workflow engine redun aims to be a more expressive and efficient workflow framework, built on top of the popular Python pr

insitro 372 Jan 4, 2023