wa-chat-server-mluvii
Version:
Mluvii adapter for the modules wa-chat-server
39 lines (27 loc) • 1.3 kB
Markdown
# wa-chat-server-mluvii
**wa-chat-server** adapter for the **Mluvii** client.
## Adapter Registration
The initialization of the **wa-chat-server** with a registered
**wa-chat-server-mluvii** adapter looks like this:
```
import { WAChatServer, Types } from 'wa-chat-server';
import { WAChatServerMluvii } from 'wa-chat-server-mluvii';
const server = new WAChatServer(
(process.env as any) as Types.IWAChatServerConfig
);
server.addAdapter('mluvii', WAChatServerMluvii);
server.serve();
```
## Configuration
The configuration is part of the **wa-chat-server** configuration where the keys relevant for
**wa-chat-server-mluvii** have to be prefixed with `adapter.mluvii.`.
* `username` - User name for authentication for the Mluvii public API.
* `secret` - Password used authentication for the Mluvii public API.
* `getTokenUrl` - URL of the Mluvii API for fetching the JWT (defaults to `https://app.mluvii.com/login/connect/token`).
* `sendMessageUrl` - URL of the Mluvii send API (defaults to `https://app.mluvii.com/api/v1/Chatbot/{chatbotId}`).
* `chatbotId` - Chatbot ID
## Supported Watson Features
The following Watson features are implemented:
* Markup in `response_type=='text'` (it is converted to markdown)
* `response_type=='option'`
* Dismabiguation (`response_type=='option'`)