Giter Site home page Giter Site logo

aadityanair / jarvis-on-messenger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swapagarwal/jarvis-on-messenger

0.0 2.0 0.0 220 KB

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

Home Page: https://m.me/J.A.R.V.I.S.on.Messenger

License: MIT License

Python 100.00%

jarvis-on-messenger's Introduction

JARVIS on Messenger

Just A Rather Very Intelligent System, now on Messenger!

Build Status Python PEP8 Gitmoji License Gitter Contributors Beginner Issues

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.

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

jarvis-on-messenger's People

Contributors

achelikani avatar akarshhegde avatar akornor avatar azie-ginanjar avatar bryantvolk avatar camdroid avatar coderowl avatar conormag94 avatar cskinner74 avatar gitter-badger avatar havanagrawal avatar krizhan avatar leegenes avatar matthiasrms avatar narendravardi avatar nikhilgeo avatar nolannicholson avatar oddurad avatar sarthakmadaan avatar scottyla19 avatar seongju avatar shaishavgandhi avatar shanmukhateja avatar shnupta avatar shreyas95 avatar subhrajyotisen avatar swapagarwal avatar tdraebing avatar ushalnaidoo avatar ymittal avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.