-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
232 changed files
with
21,977 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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.
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.
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.
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.
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.
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
Oops, something went wrong.