Project

lita-wit

0.0
No commit activity in last 3 years
No release in over 3 years
A Lita handler for Wit.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.3
>= 0
>= 3.0.0
>= 0

Runtime

>= 4.7
< 5.0.0, >= 4.0.0
 Project Readme

lita-wit

Build Status Coverage Status

This is a Lita handler to converse with Wit.ai

Using Lita and Wit.ai, you can easily create text or voice based bots that humans can chat with on their preferred messaging platform.

Something like this little Slack snippet...

Example of a conversation with Lita

The above snippet is a conversation with a Lita bot configured with a Slack adapter and this lita-wit handler. This lita-wit handler is conversing with a publically accessible pre-configured Wit.ai chatbot - https://wit.ai/dbastin/Lita.

Once you get it up and running, you'll see that Wit.ai not only enables your robot to understand humans, it also helps you discover their unforeseen needs. It's all very clever.

Installation

Add lita-wit to your Lita instance's Gemfile:

gem "lita-wit"

Configuration

You'll need to add the Wit.ai API server access token. Please sign up and fork the pre-configured Wit.ai bot. You can configure the callback actions the robot performs by specifying a different actions_class

Lita.configure do |config|
  # config... config... config...

  # https://wit.ai/dbastin/Lita... (fork it!)
  config.handlers.wit.server_access_token = '72XXMP6VAKG2SAPLTXVQS6H5PBLVQIJW'

  # default actions are in this class... (specify your own if you like)
  config.handlers.wit.actions_class = Lita::Actions::Weather
end

Usage

Just send a message mentioning your robot by it's name or alias, either directly as a command or anywhere else in the message.

> Lita, is it raining in Istanbul?
#=> Sorry, I don't know what the weather is like in Istanbul. I'm just a simple chatbot who loves a chat.

> Ok. Tell me if it is snowing lita.
#=> Where exactly?

Your robot's name will be stripped from the message we send to Wit.ai

Thanks

Tom Beynon - Great handler for Cleverbot lita-ai

License

MIT