Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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

About

A Lita handler for Wit. Check out https://www.lita.io and https://wit.ai

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.