# botkitwit

> A middleware for using Wit.ai in a Botkit-powered bot

Latest version **1.0.0** (published 2019-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install botkitwit
pnpm add botkitwit
yarn add botkitwit
bun add botkitwit
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-02-24 |
| First published | 2019-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 10 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | benbrown@gmail.com |
| Maintainers | mabuonomo |
| Keywords | botkit, wit.ai, slack |

## Links

- npm: https://www.npmjs.com/package/botkitwit
- Repository: https://github.com/mabuonomo/botkitwit-ts
- Homepage: https://github.com/mabuonomo/botkitwit#readme
- Issues: https://github.com/mabuonomo/botkitwit/issues
- npm.io page: https://npm.io/package/botkitwit

## Dependencies (8)

- [botkit](https://npm.io/package/botkit.md) ^0.7.3
- [express](https://npm.io/package/express.md) ^4.16.4
- [node-wit](https://npm.io/package/node-wit.md) ^5.0.0
- [typescript](https://npm.io/package/typescript.md) ^3.3.3333
- [@types/node](https://npm.io/package/@types/node.md) ^11.9.5
- [express-hbs](https://npm.io/package/express-hbs.md) ^2.0.2
- [@types/express](https://npm.io/package/@types/express.md) ^4.16.1
- [@types/node-wit](https://npm.io/package/@types/node-wit.md) ^4.2.2

## Recent versions

- 1.0.0 (latest) — 2019-02-24

## README

# BotKitWit-TS

BotKitWit is an alternative, typescript, version (up to date) of https://github.com/howdyai/botkit-middleware-witai

## Compatibility with:
* Node-Wit ^5.0.0

## Use Wit.ai's natural language tools in your Botkit-powered Bot!

This middleware plugin for [Botkit](http://howdy.ai/botkit) allows you
to seamlessly integrate Wit.ai natural language intent APIs into your Botkit bot.

[Wit.ai](http://wit.ai) provides a service that uses machine learning to
help developers handle natural language input.  The Wit API receives input
from the user, and translates it into one or more "intents" which map to known
actions or choices.  The power of Wit is that it can continually be trained
to understand more and more responses without changing the underlying bot code!

## Setup

Create a Wit application [here](https://wit.ai/apps/new).  Then, set up and
train at least one entity.

Add botkitwit as a dependency to your Botkit bot!

```
npm install --save botkitwit
```

Enable the middleware:

```

let config: IConfig = { token: 'WIT_ACCESS_TOKEN', minimum_confidence: 0.5 }
let wit = new BotKitWit(config)

controller.middleware.receive.use(wit.receive);

controller.hears(['wit_entity_1', 'wit_entity_2'],'direct_message',wit.hears,function(bot, message) {

    // ...
    // message.text         (your message)
    // message.response     (WIT's response)
    bot.reply(message, message.text);
});
```

For a full example see [example_bot.ts.template](example_bot.ts.template)

---
_Source: https://npm.io/package/botkitwit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
