Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mehfuzh committed Nov 28, 2017
1 parent b8719e9 commit 25ca087
Show file tree
Hide file tree
Showing 232 changed files with 21,977 additions and 7 deletions.
Binary file added _build/doctrees/build-slack-bot.doctree
Binary file not shown.
Binary file added _build/doctrees/cloud-code.doctree
Binary file not shown.
Binary file added _build/doctrees/command-line-interface.doctree
Binary file not shown.
Binary file added _build/doctrees/config_vars.doctree
Binary file not shown.
Binary file added _build/doctrees/configure-slack-app.doctree
Binary file not shown.
Binary file added _build/doctrees/create-slack-app.doctree
Binary file not shown.
Binary file added _build/doctrees/create-slack-bot.doctree
Binary file not shown.
Binary file added _build/doctrees/deploy-slack-bot.doctree
Binary file not shown.
Binary file added _build/doctrees/entities.doctree
Binary file not shown.
Binary file added _build/doctrees/environment.pickle
Binary file not shown.
Binary file added _build/doctrees/getting-started.doctree
Binary file not shown.
Binary file added _build/doctrees/index.doctree
Binary file not shown.
Binary file added _build/doctrees/intro.doctree
Binary file not shown.
Binary file added _build/doctrees/json-api.doctree
Binary file not shown.
Binary file added _build/doctrees/key-value-store.doctree
Binary file not shown.
Binary file added _build/doctrees/message-object.doctree
Binary file not shown.
Binary file added _build/doctrees/register.doctree
Binary file not shown.
Binary file added _build/doctrees/resources.doctree
Binary file not shown.
Binary file added _build/doctrees/setup-twilio.doctree
Binary file not shown.
Binary file not shown.
Binary file added _build/doctrees/slack-branding.doctree
Binary file not shown.
Binary file added _build/doctrees/slack-resources.doctree
Binary file not shown.
Binary file added _build/doctrees/test-your-slack-bot.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions _build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 8c6ff376e58d4ee533dc4d02c77b7a69
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added _build/html/_images/add-a-slack-bot-dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/blank-bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/code-block-action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/code-block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/context-vars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/create-bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/create-slack-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/define-entity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/entities.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/event-request-url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/getting-started-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/json-api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/json-reply.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/message-service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/messenger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/platform-dash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/register.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/setup-twilio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/slack-add-features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/slack-app-oauth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _build/html/_images/slack-bot-events.png
Binary file added _build/html/_images/slack-bot-install.png
Binary file added _build/html/_images/slack-complete.png
Binary file added _build/html/_images/slack-credentials.png
Binary file added _build/html/_images/slack-turing-bot-example.png
Binary file added _build/html/_images/slack.png
Binary file added _build/html/_images/sms.png
Binary file added _build/html/_images/telegram.png
Binary file added _build/html/_images/twilio-number.png
Binary file added _build/html/_images/twilio-webhook.png
Binary file added _build/html/_images/viber.png
Binary file added _build/html/_images/website.png
Binary file added _build/html/_images/wechat.png
23 changes: 23 additions & 0 deletions _build/html/_sources/build-slack-bot.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Build

Use the Command Line Interface to craete a bot project in the following way:

```shell
rbp create slack-bot
```

Go to your `main.js` file and you will find the following:

```javascript
import Ext from 'recime-bot-extension';
import responder from "recime-message-responder";

const __ = Ext.default;

exports.handler = (args, done)=>{
done(responder.respond(args));
};
```

This will also create the bot in your dashboard. Use the coversation builder or have addtional logic to handle slack commands `args.command` or totally implement custom flow and then send out responses using `recime-bot-extension` npm module.

54 changes: 54 additions & 0 deletions _build/html/_sources/cloud-code.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Cloud Code

The Cloud Code runtime enables you to quickly build server-side logic from the `Coversation Builder`. Click on `code` button in the toolbar as shown below to insert code blocks in your conversation flow.

![](code-block.png)

Here you can set variables which you can use from UI elements in the current context.

![](code-block-action.png)

`context` parameter have the following properties:

| Property Name | Description |
| -- |
| `args` | [User input](message-object.md)
| `nlp` | Contains extracted entities and intents for an expression.
| `vars` | Set or get vars to use in the current context.


```javascript
exports.handler = (context, done) => {
context.vars.set("name", "John Doe");
done();
};
```
Use it within the conversation builder in the following way using double braces syntax:

![](context-vars.png)


It also possible to use [extension module](https://github.com/Recime/recime-bot-extension) directly and return response from within a code block:

```javascript
import Ext from "recime-bot-extension";
const __ = Ext.default;

exports.handler = (context, done) => {
done(__.text("Hello world"));
};
```

Cloud Code can be useful in the following scnearios:

* Retrieving data from your existing API that you want inject in the conversation flow.
* Construct dynamic response based on user input and extracted entities.


The following libraries are available in the **Cloud Code** execution enviorment:

* [node core](https://nodejs.org/api/modules.html#modules_core_modules)
* [request](https://github.com/request/request)
* [recime-bot-extension](https://github.com/Recime/recime-bot-extension)
* [recime-keyvalue-store](https://github.com/Recime/recime-keyvalue-store)
* **console.log(string|object)** - To output directly into the bot. Used for debugging.
42 changes: 42 additions & 0 deletions _build/html/_sources/command-line-interface.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Command Line Interface

`Recime Command Line Interface` requires [node](https://nodejs.org/en/) (version >=6.9.1) and uses `npm` as package manager.

You can create bots easily by using the `Recime` CLI. In order install the CLI, type following command:

```shell
npm install -g recime
```

Once the CLI is installed correctly, type the following to verify:

```shell
rbp --version
```

Next, go to [console.recime.io/my-account](https://console.recime.io/my-account) and copy the API Key to your clipboard.

![](profile.png)


Type the following command from your `macOS` terminal or `windows` comamnd prompt:

```shell
rbp login
```

Once verified, you will see the following confirmation:

```shell
~ rbp login
Paste your api key from "console.recime.io/my-account":
2880e1f07a2149509661d1ad19408d5b
|

Logged in as: [email protected]

For any questions and feedback, please reach us at [email protected].
~
```

Now you are all set and ready to create your first awesome bot!
33 changes: 33 additions & 0 deletions _build/html/_sources/config_vars.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Configuration & Config Vars

Bot Config variables are local to developers. Developers can use config variables to have separate production keys to that of development or an open source bot may have hundreds and thousands of deployments where different environment is maintained by each developer.

The traditional approach for handling such config vars is to put them under source - in a properties file of some sort. This is an error-prone process, and is especially complicated for open source apps which often have to maintain separate (and private) branches with app-specific configurations.

A better solution is to use environment variables, and keep the keys out of the code. On a traditional host or working locally you can set environment vars in your bashrc file. On Recime, you use config vars.

Use Recime CLI’s `config set` to set your config variable for the bot:

```
bash-3.2$ rbp config set PIPEDRIVE_USERNAME=johnsmith

INFO: Configuration Saved Successfully.

For any questions and feedback, please reach us at [email protected].

bash-3.2$

```
Once set you can access config vars from within your bot in the following manner:

```
const aws = require('aws-sdk');

let s3 = new aws.S3({
accessKeyId: process.env.S3_KEY,
secretAccessKey: process.env.S3_SECRET
});

```

Now, upon deploying to Recime, the bot will use the keys set in the config.
28 changes: 28 additions & 0 deletions _build/html/_sources/configure-slack-app.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Configure Slack Bot


Once deployed, the first step is to create a bot user. Go to "Add Features" section and click on "Bots" to add a new bot user.


![](add-a-slack-bot-dialog.png)


Click "Add Bot".


Next, go to "Basic Information" and click on "Events Subscription" under "Add features and functionality". Toggle the "Enable Events" switch and then paste the bot endpoint in the `Request URL` textbox in the following way:

![](event-request-url.png)

Next, subscribe to the events relevant to your bot. In this case, I've subscribed to `message.im` event that will send a callback to the bot for direct messages.

![](slack-bot-events.png)


At this point, we have successfully configured the slack bot. Next step is to activate distribution for the bot to be shared with teams or submit your app to the [Slack App Directory](https://slack.com/apps).

![](slack-add-features.png)




9 changes: 9 additions & 0 deletions _build/html/_sources/create-slack-app.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Create Slack App

Login to your slack account, go to [apps](https://api.slack.com/apps) page and create a new app.


![](create-slack-app.png)


Specify name of the app and the development team in the "Create an App" dialog as shown above.
23 changes: 23 additions & 0 deletions _build/html/_sources/create-slack-bot.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# How to Build a Slack Bot

Use the Command Line Interface to craete a bot project in the following way:

```shell
rbp create slack-bot
```

Go to your `main.js` file and you will find the following:

```javascript
import Ext from 'recime-bot-extension';
import responder from "recime-message-responder";

const __ = Ext.default;

exports.handler = (args, done)=>{
done(responder.respond(args));
};
```

This will also create the bot in your dashboard. Use the coversation builder or have addtional logic to handle slack commands `args.command` or totally implement custom flow and then send out response using `recime-bot-extension` npm module.

25 changes: 25 additions & 0 deletions _build/html/_sources/deploy-slack-bot.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#Deploy

Go to "Basic Information". Take a note of the `Client ID` and `Secret`.


![](slack-credentials.png)


From `rbp` type the folloiwng command:

```
rbp config slack

```

This will start the interactive prompt for setting `Client ID` and `Secret`. These are used by `Recime` framework to initiate the `OAuth` flow on behalf of the user.


Deploy the bot by typing the following command:

```
rbp deploy

```

25 changes: 25 additions & 0 deletions _build/html/_sources/entities.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Defining Entities

An entity represents a term or object in the user's expression that provides clarification or specific context for a particular intent.

Here in the following example:

![](entities.png)

Here in the above statement, `Location` is an entity.

You can define an entity by highlighting a word and then clicking on the entities from the list or creating a new one by typing into filter box.


![](define-entity.png)


Entities are available as a context variable and can be accessed via `context.nlp.entities` to use from the conversation UI as template variable (e.g. `{{nlp.location}}`) or `cloud code` in the following way:


```javascript
exports.handler = (context, done)=>{
console.log(context.nlp.entities);
done();
};
```
44 changes: 44 additions & 0 deletions _build/html/_sources/getting-started.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Getting Started

Once the account is created. Next step is to create your first bot.

Once you are in your dashboard, press the "+ Create a bot" button. This will give you the create bot dialog:

![](create-bot.png)

Enter title, description of the of the bot. Upload an icon (256x256) and finally choose your language.


Press "Submit".

This will create a blank bot with `start`, `default` and `about` intent.

![](blank-bot.png)


Intents are the building blocks of your bot. An intent contains conversation blocks and expressions that can trigger it. You can also trigger an intent by an user event like button click.

Here are the definiation of the basic intents that are the building blocks of your bot.

| Intent Name | Description | Required |
| -- | -- | -- |
| `start` | Defines the start of the conversation. It is called automatically when the conversation starts | Y |
| `about` | The intent is callled when some types "about" or any about event triggered by the user. This contains the default branding information. | N |
| `default` | Contains default message shown to a user when the bot does not understand an expression. | Y |

Test your bot by clicking on the "Test the Bot" button.

![](getting-started-test.png)


You can define expressions from "Define Expressions" tab. The default template already creates a few for you. In this case, messages in `start` intent can also be triggered by typing "Hi", "Hello" or "Start".

![](getting-started-expressions.png)








34 changes: 34 additions & 0 deletions _build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. Recime Documentation documentation master file, created by
sphinx-quickstart on Mon Nov 27 23:20:08 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Recime Documentation!
================================================

.. toctree::
:maxdepth: 2
:caption: Recime Documentation

intro
register
getting-started
entities
json-api
cloud-code
message-object
command-line-interface
config_vars
create-slack-bot
setup-twilio
key-value-store
resources



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
33 changes: 33 additions & 0 deletions _build/html/_sources/intro.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Introduction

Recime (ˈresəˌmē) is an end-to-end AI chatbot solution to automate customer support and content distribution. It gives you the tools to build omni-channel chatbots quickly and easily and eventually measure growth and user engagement to save cost and increase customer satisfaction.


![](platform-dash.png)

## Supported Channels

Recime is committed to supporting the most channels on the market. Today, you can use Recime to build bots for:

| Channel||
| ---- | ---- |
| Facebook Messenger |![](messenger.png) |
| Web (HeadChat) | ![](website.png)|
|WeChat|![](wechat.png)|
|Viber|![](viber.png)|
|Slack|![](slack.png)|
|Telegram|![](telegram.png)|
|SMS (Twilio) |![](sms.png)|


The Recime Cloud gives you full advantage of the range of structured and rich message types these channels have to offer, all via one easy-to-use and consistent API. When new features are released by channels, Recime stays up to date and helps you take advantage of the new functionality with little or no changes to your existing code.


## We're Here to Help!

Need help? If you can’t find the answer you’re looking for in this documentation, get in touch with us by [email](mailto:[email protected]).

## Join the Slack Channel

You can find us on our [community slack channel](https://slackpass.io/recimecommunity) and on [twitter](https://twitter.com/GetRecime) for the latest news and we would love your feedback and ideas to improve the platform.

Loading

0 comments on commit 25ca087

Please sign in to comment.