Giter Site home page Giter Site logo

benhoff / vexbot Goto Github PK

View Code? Open in Web Editor NEW
64.0 12.0 21.0 2.52 MB

Chat bot featuring multiple services connected to a bot instance using messaging

License: GNU General Public License v3.0

Python 100.00%
chat chatbot bot linux irc xmpp socketio youtube

vexbot's Introduction

vexbot

Documentation Status Climate Status

Pluggable bot

Under development. Very useable but currently not feature complete.

Requirements

Requires python 3.5 for asyncio and only runs on linux.

If you're a python developer, you can probably get this to run on not linux.

Installation

You will need an active DBus user session bus. Depending on your distro, you might already have one (Arch linux, for example).

For Ubuntu:

$ apt-get install dbus-user-session python3-gi python3-dev python3-pip build-essential

For everyone:

$ python3 -m venv <DIR>
$ source <DIR>/bin/activate
$ ln -s /usr/lib/python3/dist-packages/gi <DIR>/lib/python3.5/site-packages/
$ pip install vexbot[process_manager]

Configuring

Make sure your virtual environment is activated. Then run:

$ vexbot_generate_certificates
$ vexbot_generate_unit_file
$ systemctl --user daemon-reload

Your bot is ready to run!

Running

$ systemctl --user start vexbot

Or

$ vexbot_robot

Please note that vexbot has a client/server architecture. The above commands will launch the server. To launch the command line client:

$ vexbot

Exit the command line client by typing !exit or using ctl+D.

vexbot's People

Contributors

albrnick avatar alexbate avatar alexsiri7 avatar andybee avatar astahlman avatar benhoff avatar claidiere avatar dag0310 avatar holzhaus avatar shbhrsaha avatar webmariner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vexbot's Issues

Streaming

Hi, I have no idea how/where else to contact you, but I have always enjoyed your streams about vexbot.
Are you not doing them anymore?

running adapters without needed packages installed

Currently running the adapter python files without the packages installed ends in weird errors instead of clean script exits.

Running without arguments leaves programs running to infinity and doesn't respond to ctl-C events

Bootstrap Intent Classification/Utterance Generation

Intent Classification

Rasa NLU uses a linear SVM to classify the intent by leveraging spaCy's n-gram model to vectorize utterances.

There's also been research into using seq2seq to classify intent and do slot filling as seen in this paper from microsoft. Also, here's a python implementation.

Entity Extraction

Rasa NLU has several methods of entity extraction as documented here. These include conditional random field for custom entity extraction (not pretrained). SpaCy provides entity extraction as well in the form of an averaged perceptron. The third option is a duckling server, which uses context-free grammar. Facebook has an Open source implementation of context-free grammar.

As mentioned above, a seq2seq approach can also be used as documented here.

Bootstrapping Utterances

Writing Utterances is a pain in the rear. There might be a way to bootstrap the utterance generation to alleviate the need to manually make them.

Here's a list of data corpus's that should prove useful for that regard. That paper also has an overview of useful methods for building dialogue systems.

The paper also has an interesting reference Luke, I am your father: dealing with out-of-domain requests by using movies subtitles. This should be useful for one off responses.

This google blog research has an example for handle to help rank uniquness of response, which will be necessary for generation of unique responses.

this repo uses the Cornell Movie-Dialogs Corpus and a seq to seq neural net to implement the google blog post.

Should be able to also leverage reddit using the movie corpus code I've written already.

Context

The real challenge is going to be handling context.

There's a way to handle the context as proposed in the ubuntu dialog corpus, using an affinity model with context c (five consecutive utterances for example). The Paper is here.

Final Thoughts

The easiest would be to follow the paper to build a one off for out of domain requests. A sort of pithy response bot, as it were.

XPub/XSub Handling

There's something weird about the way that I'm handling the subscriptions.

For example, on the adapter messaging side, there should be an easy way to do multiple subscriptions. This is handled in the configuration file.

I'm not sure if it makes sense to have multiple subscriptions or not on the bot side (vexbot.messaging). Since the XPub/XSub are binding, I believe the answer is no.

I'd probably like to switch the defaults around, so that the subscription socket that the adapters are connecting to is tcp://my.address.here:4000 instead of the current tcp://my.address.here:4001

Handle `Live chat is no longer live` error from the youtube api

Traceback (most recent call last):
File "/usr/lib64/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/home/hoff/swdev/vexbot/vexbot/adapters/youtube_api.py", line 144, in _recv_loop
livechat_response = youtube_api.liveChatMessages().list(liveChatId=live_chat_id, part=part, pageToken=next_token).execute()
File "/home/hoff/swdev/vexbot/env/lib/python3.5/site-packages/oauth2client/util.py", line 135, in positional_wrapper
return wrapped(_args, *_kwargs)
File "/home/hoff/swdev/vexbot/env/lib/python3.5/site-packages/googleapiclient/http.py", line 832, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/youtube/v3/liveChat/messages?alt=json&liveChatId=Cg0KC3c4U2VZa1FGMDNJ&part=snippet%2C+authorDetails&pageToken=GK_ynav8tc4CIKmcwc7_tc4C returned "The live chat is no longer live.">

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.