Full Code of RocketChat/hubot-natural for AI

master 1a60d89a5cf5 cached
27 files
293.8 KB
75.2k tokens
5 symbols
1 requests
Download .txt
Showing preview only (309K chars total). Download the full file or copy to clipboard to get everything.
Repository: RocketChat/hubot-natural
Branch: master
Commit: 1a60d89a5cf5
Files: 27
Total size: 293.8 KB

Directory structure:
gitextract_fk6vyz64/

├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── bot_config.py
├── docker/
│   └── Dockerfile
├── docker-compose.yml
├── docs/
│   ├── config_bot.md
│   └── config_live_transfer.md
├── package.json
├── scripts/
│   ├── actions/
│   │   ├── configure.coffee
│   │   ├── error.coffee
│   │   ├── respond.coffee
│   │   └── rest.coffee
│   ├── bot/
│   │   ├── action-handler.coffee
│   │   ├── classifier.coffee
│   │   └── index.coffee
│   ├── index.coffee
│   └── lib/
│       ├── common.coffee
│       └── security.coffee
└── training_data/
    ├── catbot-en.yml
    ├── corpus.yml
    ├── rest-example.yml
    ├── rocket-small.yml
    └── rocket.yml

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
### Rocketchat ###

# Generated during the docker-compose up
data
uploads

# Created by https://www.gitignore.io/api/vim,node,macos,linux

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


### Vim ###
# swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
# session
Session.vim
# temporary
.netrwhist
# auto-generated tag files
tags

# End of https://www.gitignore.io/api/vim,node,macos,linux
# Hubot files
.editorconfig
.hubot_history
bin/
chat/
launch.sh


================================================
FILE: .travis.yml
================================================
dist: trusty

language: node_js
node_js:
  - "node"
  - "8"

before_install:
  - npm i -g npm@5.6.0

install:
  - npm install -g coffeelint

script:
  - coffeelint scripts


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
  address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at team@rocket.chat . The project team
will review and investigate all complaints, and will respond in a way that it deems
appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to sdl_cordova_android

Third party contributions are essential for making this repository great. However, we do have a few guidelines we need contributors to follow.

### Gitflow
We use Gitflow as our branch management system. Please read up on it [here](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow). The main points you should know are:

* All feature branches should be based on `develop` and have the format `feature/branch_name`.
* Minor bug fixes should be based on `master` and have the format `hotfix/branch_name`.
* All pull requests should involve a single change. Pull Requests that involve multiple changes (it is our discretion what precisely this means) will be rejected with a reason.
* All commits should involve logical units. Please do not put all changed code in one commit, unless it is a very minor change.
* Work in progress pull requests should have "[WIP]" in front of the Pull Request title. When you are ready to merge, remove this tag and @mention `smartdevicelink/developers` to get it scheduled for review.

* Please document all code written, and remember updating README.md


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2017 Rocket.Chat

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# Hubot Natural

[![Build Status](https://travis-ci.org/RocketChat/hubot-natural.svg?branch=master)](https://travis-ci.org/RocketChat/hubot-natural)

## Natural Language ChatBot

Hubot is one of the most famous bot creating framework on the web, that's because github made it easy to create. If you can define your commands in a RegExp param, basically you can do anything with Hubot. That's a great contribution to ChatOps culture.

Inspired by that, we wanted to provide the same simplicity to our community to develop chatbots that can actually process natural language and execute tasks, as easy as building RegExp oriented bots.

So, we've found a really charming project to initiate from, the [Digital Ocean's Heartbot](https://github.com/digitalocean/heartbot) _a shot of love to for your favorite chat client_ =)

Based on Heartbot, we introduced some NLP power from [NaturalNode](https://github.com/NaturalNode/natural) team, an impressive collections of Natural Language Processing libs made to be used in NodeJS.

And so, the _magic_ happens...

Welcome to *HubotNatural*, a new an exciting chatbot framework based in Hubot and NaturalNode libs, with an simple and extensible architecture designed by Digital Ocean's HeartBot Team, made with love and care by Rocket.Chat Team.  

We hope you enjoy the project and find some time to contribute.  

## How it Works

HubotNatural is made to be easy to train and extend. So what you have to understand basically is that it has an YAML corpus, where you can design your chatbot interactions using nothing but YAML's notation.

All YAML interactions designed in corpus can have it's own parameters, which will be processed by an event class.

Event classes give the possibility to extend HubotNatural. By writing your own event classes you can give your chatbot the skills to interact with any services you need.

### YAML corpus

The YAML file is loaded in `scripts/index.js`, parsed and passed to chatbot bind, which will be found in `scripts/bot/index.js`, the cortex of the bot, where all information flux and control are programmed.

The YAML corpus is located in `training_data/corpus.yml` and it's basic structure looks like this:  

```yaml
trust: .85
interactions:
  - name: salutation
    expect:
      - hi there
      - hello everyone
      - what's up bot
      - good morning
    answer:
      - - Hello there $user, how are you?
        - Glad to be here...
      - Hey there, nice to see you!
    event: respond
```

What this syntax means:

- `trust`: the minimum level of certain that must be returned by the classifier in order to run this interaction. Value is 0 to 1 (0% to 100%). If a classifier returns a value of certainty minor than `trust`, the bots responds with and error interaction node.  
- `interactions`: An vector with lots of interaction nodes that will be parsed. Every interaction designed to your chatbot must be under an interaction.node object structure.
- `name`: that's the unique name of the interaction by which it will be identified. Do not create more than one interaction with the same `node.name` attribute.  
- `expect`: Those are the sentences that will be given to the bots training. They can be strings or keywords vectors, like `['consume','use']`.   
- `answer`: the messages that will be sent to the user, if the classifiers get classified above the trust level. The `node.message` will be parsed and sent by event class. In order to use multiline strings inside your YAML, you must follow the [YAML Multiline Strings](http://yaml-multiline.info/) syntax. You can specify variables in message. By default HubotNatural comes with `$user`, `$bot` and `$room` variables.
- `event`: is the name of the CoffeeScript or JavaScript Class inside `scripts/events`, without the file extension.

### Event Coffee Classes

Event classes can be written to extend the chatbot skills. They receives the interaction object and parse the message, like this:  

```yaml
class respond
  constructor: (@interaction) ->
  process: (msg) =>
    sendMessages(stringElseRandomKey(@interaction.answer), msg)

module.exports = respond
```

It's base constructor is the `@interaction` node so you can have access to all attributes inside an interaction just using `@interaction.attribute`. Here you can parse texts, call APIs, read files, access databases, and everything else you need.  
You may want to use the function `stringElseRandomKey` to get a random element of a list, if it's parameter is a list, and use the function `sendMessages` to send messages to an user.

#### Logistic Regression Classifier

The NaturalNode library comes with two kinds of classifiers, the Naive Bayes classifier known as the `BayesClassifier` and the `LogisticRegressionClassifier` functions. By default, HubotNatural uses the `LogisticRegressionClassifier`. It just came with better results in our tests.

#### PorterStemmer

There is also more than one kind of stemmer. You should set the stemmer to define your language. By default we use the PorterStemmerPt for portuguese, but you can find english, russian, italian, french, spanish and other stemmers in NaturalNode libs, or even write your own based on those.

Just check inside `node_modules/natural/lib/natural/stemmers/`.

To change the stemmers language, just set the environment variable `HUBOT_LANG` as `pt`, `en`, `es`, and any other language termination that corresponds to a stemmer file inside the above directory.

## Deploy with Docker

We have a Dockerfile that builds a lightweight image based in Linux Alpine with all the repository content so you can upload that image to a docker registry and deploy your chatbot from there. It is located on `docker` folder.

You also can use `docker-compose.yml` file to load a local instance of Rocket.Chat, MongoDB and HubotNatural services, where you can change the parameters if you must.

The docker-compose file looks like this:

```yaml
version: '2'

services:
  rocketchat:
    image: rocketchat/rocket.chat:latest
    restart: unless-stopped
    volumes:
      - ./uploads:/app/uploads
    environment:
      - PORT=3000
      - ROOT_URL=http://localhost:3000
      - MONGO_URL=mongodb://mongo:27017/rocketchat
      - MONGO_OPLOG_URL=mongodb://mongo:27017/local
      - MAIL_URL=smtp://smtp.email
#       - HTTP_PROXY=http://proxy.domain.com
#       - HTTPS_PROXY=http://proxy.domain.com
    depends_on:
      - mongo
    ports:
      - 3000:3000

  mongo:
    image: mongo:3.2
    restart: unless-stopped
    volumes:
     - ./data/db:/data/db
     #- ./data/dump:/dump
    command: mongod --smallfiles --oplogSize 128 --replSet rs0

  mongo-init-replica:
    image: mongo:3.2
    command: 'mongo mongo/rocketchat --eval "rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})"'
    depends_on:
      - mongo

  hubot-natural:
    build: .
    restart: unless-stopped
    environment:
      - HUBOT_ADAPTER=rocketchat
      - HUBOT_NAME='Hubot Natural'
      - HUBOT_OWNER=RocketChat
      - HUBOT_DESCRIPTION='Hubot natural language processing'
      - HUBOT_LOG_LEVEL=debug
      - HUBOT_CORPUS=corpus.yml
      - HUBOT_LANG=pt
      - RESPOND_TO_DM=true
      - RESPOND_TO_LIVECHAT=true
      - RESPOND_TO_EDITED=true
      - LISTEN_ON_ALL_PUBLIC=false
      - ROCKETCHAT_AUTH=password
      - ROCKETCHAT_URL=rocketchat:3000
      - ROCKETCHAT_ROOM=GENERAL
      - ROCKETCHAT_USER=botnat
      - ROCKETCHAT_PASSWORD=botnatpass
      - HUBOT_NATURAL_DEBUG_MODE=true
    volumes:
      - ./scripts:/home/hubotnat/bot/scripts
      - ./training_data:/home/hubotnat/bot/training_data
    depends_on:
      - rocketchat
    ports:
      - 3001:8080
```

You can change the attributes of variables and volumes to your specific needs and run `docker-compose up` in terminal to start the rocketchat service at `http://localhost:3000`.
*ATTENTION:* You must remember that hubot must have a real rocketchat user created to login with. So by the first time you run this, you must first go into rocketchat and create a new user for hubot, change the `ROCKETCHAT_USER` and `ROCKETCHAT_PASSWORD` variables in the docker-compose.yml file, and then reload the services using `docker-compose stop && docker-compose up` to start it all over again.

If you want to run only the hubot-natural service to connect an already running instance of Rocket.Chat, you just need to remember to set the `ROCKETCHAT_URL` to a correct value, like `https://open.rocket.chat`.

## Bot configuration

In order to correctly use Hubot Natural, after running `docker-compose up` command, it is necessary to do some configuration steps. To do that, there are two main options:

The first one is to do manually the steps described at [bot config documentation](docs/config_bot.md).

The second option is to execute the script `bot_config.py`, located at root directory on project. That will automatically configure bot based on following variables defined on script: `admin_name, admin_password, bot_name` and `bot_password`.  It is important to remember of properly set the values of this variables according to the context. The values used on `bot_name` and `bot_password` must be the same defined on docker-compose.yml, on the variables `ROCKETCHAT_USER` and `ROCKETCHAT_PASSWORD` respectively. And the values defined at `admin_name` and `admin_password` variables must be the credentials of an pre existent user on rocketchat, that has admin permissions.

To create an admin user automatically, before executing the services, just define the variables `ADMIN_USERNAME` and `ADMIN_PASS` for rocketchat service on `docker-compose.yml`.

## Deploy with Hubot

To deploy HubotNatural, first you have to install yo hubot-generator:

```shell
npm install -g yo generator-hubot
```

Then you will clone HubotNatural repository:  

```shell
git clone https://github.com/RocketChat/hubot-natural.git mybot
```

Change 'mybot' in the git clone command above to whatever your bot's name will be, and install hubot binaries, without overwitting any of the files inside the folder:

```shell
cd mybot
npm install
yo hubot

                     _____________________________
                    /                             \
   //\              |      Extracting input for    |
  ////\    _____    |   self-replication process   |
 //////\  /_____\   \                             /
 ======= |[^_/\_]|   /----------------------------
  |   | _|___@@__|__
  +===+/  ///     \_\
   | |_\ /// HUBOT/\\
   |___/\//      /  \\
         \      /   +---+
          \____/    |   |
           | //|    +===+
            \//      |xx|

? Owner Diego <diego.dorgam@rocket.chat>
? Bot name mybot
? Description A simple helpful chatbot for your Company
? Bot adapter rocketchat
   create bin/hubot
   create bin/hubot.cmd
 conflict Procfile
? Overwrite Procfile? do not overwrite
     skip Procfile
 conflict README.md
? Overwrite README.md? do not overwrite
     skip README.md
   create external-scripts.json
   create hubot-scripts.json
 conflict .gitignore
? Overwrite .gitignore? do not overwrite
     skip .gitignore
 conflict package.json
? Overwrite package.json? do not overwrite
     skip package.json
   create scripts/example.coffee
   create .editorconfig
```

Now, to run your chatbot in shell, you should run:  

```shell
bin/hubot
```

wait a minute for the loading process, and then you can talk to mybot.

Take a look to adapters to run your bot in other platafforms.

## Configure Live Transfer

It's possible to configure Hubot Natural to redirect conversation to a real person, in moments when the bot can not help users as much as needed.
To activate and configure `Live Transfer` feature, follow the steps described on [live transfer config documentation](docs/config_live_transfer.md).

## Env Variables:

In your terminal window, run:

```shell
export HUBOT_ADAPTER=rocketchat
export HUBOT_OWNER=RocketChat
export HUBOT_NAME='Bot Name'
export HUBOT_DESCRIPTION='Description of your bot'
export ROCKETCHAT_URL=https://open.rocket.chat
export ROCKETCHAT_ROOM=GENERAL
export LISTEN_ON_ALL_PUBLIC=false
export RESPOND_TO_DM=true
export RESPOND_TO_LIVECHAT=true
export ROCKETCHAT_USER=catbot
export ROCKETCHAT_PASSWORD='bot password'
export ROCKETCHAT_AUTH=password
export HUBOT_LOG_LEVEL=debug
export HUBOT_CORPUS='corpus.yml'
export HUBOT_LANG='en'
bin/hubot -a rocketchat --name $HUBOT_NAME
```  

You can check [hubot-rocketchat](https://github.com/RocketChat/hubot-rocketchat) adapter project for more details.

### PM2 Json File

As NodeJS developers we learned to love [Process Manager PM2](http://pm2.keymetrics.io), and we really encourage you to use it.

```shell
npm install pm2 -g
```

Create a `mybot.json` file and jut set it's content as:  

```json
{
	"apps": [{
		"name": "mybot",
		"interpreter": "/bin/bash",
		"watch": true,
		"ignore_watch" : ["client/img"],
		"script": "bin/hubot",
		"args": "-a rocketchat",
		"port": "3001",
		"env": {
			"ROCKETCHAT_URL": "https://localhost:3000",
			"ROCKETCHAT_ROOM": "general",
			"RESPOND_TO_DM": true,
			"ROCKETCHAT_USER": "mybot",
			"ROCKETCHAT_PASSWORD": "12345",
			"ROCKETCHAT_AUTH": "password",
			"HUBOT_LOG_LEVEL": "debug"
		}
	}
]
}
```

You can also instantiate more than one process with PM2, if you want for example to run more than one instance of your bot:  

```json
{
	"apps": [{
		"name": "mybot.0",
		"interpreter": "/bin/bash",
		"watch": true,
		"ignore_watch" : ["client/img"],
		"script": "bin/hubot",
		"args": "-a rocketchat",
		"port": "3001",
		"env": {
			"ROCKETCHAT_URL": "https://localhost:3000",
			"ROCKETCHAT_ROOM": "general",
			"RESPOND_TO_DM": true,
			"ROCKETCHAT_USER": "mybot",
			"ROCKETCHAT_PASSWORD": "12345",
			"ROCKETCHAT_AUTH": "password",
			"HUBOT_LOG_LEVEL": "debug"
		}
	}, {
		"name": "mybot.1",
		"interpreter": "/bin/bash",
		"watch": true,
		"ignore_watch" : ["client/img"],
		"script": "bin/hubot",
		"args": "-a rocketchat",
		"port": "3002",
		"env": {
			"ROCKETCHAT_URL": "https://mycompany.rocket.chat",
			"ROCKETCHAT_ROOM": "general",
			"RESPOND_TO_DM": true,
			"ROCKETCHAT_USER": "mybot",
			"ROCKETCHAT_PASSWORD": "12345",
			"ROCKETCHAT_AUTH": "password",
			"HUBOT_LOG_LEVEL": "debug"
		}
	}
]
}
```

And of course, you can go nuts setting configs for different plataforms, like facebook mensenger, twitter or telegram ;P.

## Hubot Adapters

Hubot comes with at least 38 adapters, including Rocket.Chat addapter of course.  
To connect to your Rocket.Chat instance, you can set env variables, our config pm2 json file.

Checkout other [hubot adapters](https://github.com/github/hubot/blob/master/docs/adapters.md) for more info.

## Thanks to

In Rocket.Chat we are so in love by what we do that we couldn't forget to thanks everyone that made it possible!

### Github Hubot Team

Thanks guys for this amazing framework, hubots lives in the heart of Rocket.Chat, and we recommend everyone to checkout https://hubot.github.com and find much much more about hubot!

### Natural Node Project

To the NaturalNode Team our most sincere "THAK YOU VERY MUCH!! We loved your project and we are excited to contribute!".  
Checkout https://github.com/NaturalNode/natural and let your mind blow!

### Digital Ocean's Heartbot

We can not thanks Digital Ocean enough, not only for this beautifull [HeartBot project](https://github.com/digitalocean/heartbot), but also for all the great tutorials and all the contributions to OpenSource moviment.

### Thanks to Our Community

And for last but not least, thanks to our big community of contributors, testers, users, partners, and everybody who loves Rocket.Chat and made all this possible.


================================================
FILE: bot_config.py
================================================
#!/usr/bin/env python3
# coding: utf-8

import requests
import json
import os

host = "http://rocketchat:3000"
path = "/api/v1/login"

bot_name = 'ROCKETCHAT_USER'
bot_password = 'ROCKETCHAT_PASSWORD'
bot_email = botname + '@email.com'
admin_name = 'ADMIN_USERNAME'
admin_password = 'ADMIN_PASS'

def get_authentication_token():
    login_data = {"username": admin_name, "password": admin_password}
    response = requests.post(host+path, data=json.dumps(login_data))
    if response.json()['status'] == 'success':
        print("login suceeded\n")

        authToken = response.json()['data']['authToken']
        userId = response.json()['data']['userId']
        user_header = {
            "X-Auth-Token": authToken,
            "X-User-Id": userId,
            "Content-Type": "application/json"
        }

        return user_header


user_header = get_authentication_token()


def create_user():
    user_info = {
        "name": bot_name,
        "email": bot_email,
        "password": bot_password,
        "username": bot_name,
        "requirePasswordChange": False,
        "sendWelcomeEmail": True, "roles": ['bot']
    }

    create_user_response = requests.post(
        host + "/api/v1/users.create",
        data=json.dumps(user_info),
        headers=user_header
    )

    if create_user_response.json()['success'] is True:
        print("User has been sucessfully created!")
    else:
        print("Error while creating bot user!")


def create_agent():
    agent_info = {"username": bot_name}
    create_agent_response = requests.post(
        host + "/api/v1/livechat/users/agent",
        data=json.dumps(agent_info),
        headers=user_header
    )

    if create_agent_response.json()['success'] is True:
        print("Bot agent has been sucessfully created!")
    else:
        print("Error while creating bot agent!")

    return create_agent_response


def configure_livechat():
    # Enable Livechat
    requests.post(
        host + "/api/v1/settings/Livechat_enabled",
        data=json.dumps({"value": True}),
        headers=user_header
    )

    # Disable show pre-registration form
    requests.post(
        host + "/api/v1/settings/Livechat_registration_form",
        data=json.dumps({"value": False}),
        headers=user_header
    )


def create_department(bot_agent_id):
    department_info = {
        "department": {
            "enabled": True,
            "showOnRegistration": True,
            "name": "department",
            "description": "default department"
        },
        "agents": [{
            "agentId": bot_agent_id,
            "username": bot_name,
            "count": 0,
            "order": 0
        }]
    }
    create_department_response = requests.post(
        host + "/api/v1/livechat/department",
        data=json.dumps(department_info),
        headers=user_header
    )

    if create_department_response.json()['success'] is True:
        print("Default department has been sucessfully created!")
    else:
        print("Error while creating department!")


if user_header:
    create_user()

    create_agent_response = create_agent()
    bot_agent_id = create_agent_response.json()['user']['_id']

    configure_livechat()

    create_department(bot_agent_id)

else:
    print("login failed")


================================================
FILE: docker/Dockerfile
================================================
FROM node:alpine

LABEL mantainer "Diego Dorgam <diego.dorgam@rocket.chat>"

ENV HUBOT_LANG='en'                                                  \
    HUBOT_CORPUS='training_data/corpus.yml'                          \
    HUBOT_RECURSIVE_TRAINING=false                                   \
    HUBOT_ADAPTER=rocketchat                                         \
    HUBOT_OWNER=RocketChat                                           \
    HUBOT_NAME=HubotNatural                                          \
    HUBOT_DESCRIPTION="Processamento de linguagem natural com hubot" \
    HUBOT_LOG_LEVEL=debug                                            \
    ROCKETCHAT_URL=http://rocketchat:3000                            \
    ROCKETCHAT_ROOM=GENERAL                                          \
    ROCKETCHAT_USER=chatbot                                          \
    ROCKETCHAT_PASSWORD=@12345@                                      \
    ROCKETCHAT_AUTH=password                                         \
    RESPOND_TO_DM=true                                               \
    RESPOND_TO_LIVECHAT=true                                         \
    RESPOND_TO_EDITED=true                                           \
    LIVECHAT_DEPARTMENT_ID=null                                      \
    LISTEN_ON_ALL_PUBLIC=true

RUN apk --update add --no-cache git make gcc g++ python && \
    addgroup -S hubotnat && adduser -S -g hubotnat hubotnat

USER node

RUN mkdir /home/node/.npm-global && \
    chown -R node:node /home/node/.npm-global

ENV PATH=/home/node/.npm-global/bin:$PATH \
    NPM_CONFIG_PREFIX=/home/node/.npm-global

RUN npm install -g yo generator-hubot

WORKDIR /home/hubotnat/bot

USER root

RUN mkdir -p /home/hubotnat/.config/configstore                             && \
    echo "optOut: true" > /home/hubotnat/.config/configstore/insight-yo.yml && \
    chown -R hubotnat:hubotnat /home/hubotnat

USER hubotnat

RUN yo hubot --adapter ${HUBOT_ADAPTER}         \
             --owner ${HUBOT_OWNER}             \
             --name ${HUBOT_NAME}               \
             --description ${HUBOT_DESCRIPTION} \
             --defaults --no-insight         && \
    rm /home/hubotnat/bot/external-scripts.json \
    /home/hubotnat/bot/scripts/example.coffee   \
    /home/hubotnat/bot/hubot-scripts.json


COPY ["package.json", "/home/hubotnat/bot/"]

ADD scripts/ /home/hubotnat/bot/scripts/

ADD training_data/ /home/hubotnat/bot/training_data

ENTRYPOINT /home/hubotnat/bot/bin/hubot -a rocketchat


================================================
FILE: docker-compose.yml
================================================
version: '2'

services:
  rocketchat:
    image: rocketchat/rocket.chat:latest
    restart: unless-stopped
    volumes:
      - ./uploads:/app/uploads
    environment:
      - PORT=3000
      - ROOT_URL=http://localhost:3000
      - MONGO_URL=mongodb://mongo:27017/rocketchat
      - MONGO_OPLOG_URL=mongodb://mongo:27017/local
      - MAIL_URL=smtp://smtp.email
#       - HTTP_PROXY=http://proxy.domain.com
#       - HTTPS_PROXY=http://proxy.domain.com
    depends_on:
      - mongo
    ports:
      - 3000:3000
    # labels:
    #   - "traefik.backend=rocketchat"
    #   - "traefik.frontend.rule=Host: your.domain.tld"

  mongo:
    image: mongo:3.2
    restart: unless-stopped
    volumes:
     - ./data/db:/data/db
     #- ./data/dump:/dump
    command: mongod --smallfiles --oplogSize 128 --replSet rs0
    # labels:
    #   - "traefik.enable=false"

  # this container's job is just run the command to initialize the replica set.
  # it will run the command and remove himself (it will not stay running)
  mongo-init-replica:
    image: mongo:3.2
    command: 'mongo mongo/rocketchat --eval "rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})"'
    depends_on:
      - mongo

  hubot-natural:
    # image: diegodorgam/hubot-natural:latest
    build:
      context: .
      dockerfile: ./docker/Dockerfile
    restart: unless-stopped
    environment:
      - HUBOT_ADAPTER=rocketchat
      - HUBOT_NAME='Hubot Natural'
      - HUBOT_OWNER=RocketChat
      - HUBOT_DESCRIPTION='Hubot natural language processing'
      - HUBOT_LOG_LEVEL=debug
      - HUBOT_CORPUS=training_data/corpus.yml
      - HUBOT_RECURSIVE_TRAINING=false
      - HUBOT_LANG=pt
      - RESPOND_TO_DM=true
      - RESPOND_TO_LIVECHAT=true
      - RESPOND_TO_EDITED=true
      - LISTEN_ON_ALL_PUBLIC=false
      - ROCKETCHAT_AUTH=password
      - ROCKETCHAT_URL=rocketchat:3000
      - ROCKETCHAT_ROOM=GENERAL
      - ROCKETCHAT_USER=botnat
      - ROCKETCHAT_PASSWORD=botnatpass
      - HUBOT_NATURAL_DEBUG_MODE=true
      - LIVECHAT_DEPARTMENT_ID='<LIVECHAT_DEPARTMENT_ID>'
    volumes:
      - ./scripts:/home/hubotnat/bot/scripts
      - ./training_data:/home/hubotnat/bot/training_data
    depends_on:
      - rocketchat
    ports:
      - 3001:8080


================================================
FILE: docs/config_bot.md
================================================
# Hubot Natural Bot

## Adding Hubot Natural Bot

To add the bot into your Rocket Chat, you must create an administrator account. In the initial screen, click on **Register a new account**, and fill the informations, you don't need to use a real email account.

![New account example](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/new_account.png)

Once you filled the informations, click on REGISTER A NEW ACCOUNT, and then go back to login page, and do login.

In the left side menu, click on tree points icon, and then click on **Administration** option.

After that, click on **Users** option. It will appear a right side bar, having the '+' button. Click on this button and fill the informations according to the following image. The name of bot can be modified, but must be used the user and password that are defined on ROCKETCHAT_USER and ROCKETCHAT_PASSWORD variables, on `production.yml` file. By default, the user and password are `botnat` and `botnatpass`, respectively.

To add the role to bot, click the option **Select a Role**, select bot and click on **ADD ROLE** option. Then click on **Save**.

![Adding bot tutorial](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/adding_bot.png)

Now you are ready to talk to the bot using the channels, or using @botnat before the message.

### Livechat

The Livechat allows a feature of a window that can be integrated to other pages. To activate it, you must access again the **Administration** option, by clicking on three points icon, on the left side menu. Then click on **Livechat** option.

![Livechat option on adm menu](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/livechat_sidebar.png)

On the next screen, mark the **Livechat enabled** option as True, and the **Show pre-registration form** option as False, in order to not be asked for email and password when using chat. Click then in **SAVE CHANGES**.

![Livechat activation screen](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/active_livechat.png)

Close the left side menu, and click on three points icon. Select the **Livechat** option.

![Livechat option](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/livechat_option.png)

At the right side menu, select the **User Management** option. You must add the bot as an agent, so search for botnat, then click in **ADD**.

![Adding bot as agent](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/add_agent.png)

Now it is necessary to create an department. On the left side menu, click on **Departments**, and then click in **NEW DEPARTMENT**.

![Adding bot as agent](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/new_department.png)

On the next screen, write a name and a description for the department and add the bot by selecting him on **Available agents**. Then click on **Save** option.

![Create new department](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/add_agent_to_department.png)

On the left side menu, click at **Installation**. Now you only need to copy and paste the code on your site, where you want to integrate the conversation window.

![Installation code](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/installation.png)

After integrating the code to your site, a window like the one showed in the image should be available, and ready to use.

![Livechat window](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/livechat_en.png)

#### Welcome message on Livechat

To fire a welcome message can be used **Triggers**. A **Trigger** fire an action according to a condition. A condition can be the user accessing an URL, or the time user stay on site. The action, in this case, is the welcome message send.

To add a **trigger** to Livechat, on the left side menu, click on **Triggers** option. Then mark the option **Enabled** as **Yes**, and fill the trigger name and description. In case of the firing critery is the user entering a URL, then choose the option **Visitor page URL** on **Condition** field, and on the side field write the desired URL.
Select the option **Send a message** at field **Action**, type the bot name(**botnat**) and the welcome message. After all, click on **Save**.

![Livechat Trigger URL](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/trigger_url.png)

## Updating the YAML


To read more information about the YAML structure and how to modify it, access the [Hubot-Natural README](https://github.com/RocketChat/hubot-natural/blob/master/README.md).


================================================
FILE: docs/config_live_transfer.md
================================================
# Config Live Transfer

In order to user `Live Transfer` feature, it is necessary to do some steps.

The first thing to do is to set the department hash, on the file used as corpus on bot. The department hash must be placed on `department` field, in the section named `livechat-transfer`, as showed on the image below. The file being used as corpus is the one defined on field `HUBOT_CORPUS`field, at docker-compose file.

![Updating corpus file](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/update_corpus.png)

The department hash can be obtained on the URL in department `edit screen` as showed on image below.

![Getting department id](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/department_hash.png)

To get to department `edit screen` close the left side menu, and click on three points icon. Select the **Livechat** option.

![Livechat option](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/livechat_option.png)

Now it is necessary to select the department to be used on transfer action. On the left side menu, click on **Departments**, and then click on the department name.

![Select department](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/new_department.png)

Once you got the department hash and placed on corpus file, restart the hubot-natural service, in order to update the container and reload `corpus` file.

Lastly is important to remember that the live transfer conversation channel will be created between any available user on department. For that, the user must be online, and must be previously added as an agent on department being used(The one defined on corpus file). For that, You must first add the user as an agent. At the right side menu, select the **User Management** option. , so search for the user you want, then click in **ADD**.

![Adding user as agent](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/add_as_agent.png)

Then again on the department edit screen, add the user to department by selecting him on **Available agents**. Then click on **Save** option.

![Add agent to department](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/add_user_to_department.png)


================================================
FILE: package.json
================================================
{
  "name": "hubot-natural",
  "version": "0.0.8",
  "private": true,
  "author": "Diego Dorgam <diego.dorgam@rocket.chat>",
  "description": "NLP YAML oriented chatbot",
  "dependencies": {
    "coffeescript": "^1.12.7",
    "hubot": "^2.19.0",
    "hubot-diagnostics": "0.0.1",
    "hubot-help": "^0.2.2",
    "hubot-redis-brain": "0.0.4",
    "hubot-rocketchat": "^1.0.12",
    "js-yaml": "^3.2.5",
    "natural": "^0.5.0"
  },
  "devDependencies": {
    "coffeelint": "^2.0.7"
  },
  "engines": {
    "node": "0.10.x"
  }
}


================================================
FILE: scripts/actions/configure.coffee
================================================
require 'coffeescript/register'

classifier = require '../bot/classifier'
security = require '../lib/security'
{ msgVariables, stringElseRandomKey, sendMessages,
  loadConfigfile, getConfigFilePath } = require  '../lib/common'

class Configure
  constructor: (@interaction) ->

  process: (msg) =>
    if @interaction.role?
      if security.checkRole(msg, @interaction.role)
        @act(msg)
      else
        msg.sendWithNaturalDelay(
          "*Acces Denied* Action requires role #{@interaction.role}"
        )
    else
      @act(msg)

  setVariable: (msg) ->
    raw_message = msg.message.text.replace(msg.robot.name + ' ', '')
    configurationBlock = raw_message.split(' ')[-1..].toString()

    configKeyValue = configurationBlock.split('=')
    configKey = configKeyValue[0]
    configValue = configKeyValue[1]

    key = 'configure_' + configKey + '_' + msg.envelope.room
    msg.robot.brain.set(key, configValue)
    sendMessages(stringElseRandomKey(@interaction.answer), msg,
                  { key: configKey, value: configValue })
    return

  retrain: (msg) ->
    global.config = loadConfigfile getConfigFilePath()
    classifier.train()
    sendMessages(stringElseRandomKey(@interaction.answer), msg)
    return

  act: (msg) ->
    command = @interaction.command or 'setVariable'
    console.log command
    switch command
      when 'setVariable'
        @setVariable(msg)
      when 'train'
        @retrain(msg)
    return

module.exports = Configure


================================================
FILE: scripts/actions/error.coffee
================================================
require 'coffeescript/register'

{ msgVariables, sendMessages, stringElseRandomKey } = require '../lib/common'

class Error
  constructor: (@interaction) ->
  process: (msg) =>
    sendMessages(stringElseRandomKey(@interaction.answer), msg)

module.exports = Error


================================================
FILE: scripts/actions/respond.coffee
================================================
require 'coffeescript/register'

{ msgVariables, sendMessages, stringElseRandomKey } = require '../lib/common'

livechat_department = (process.env.LIVECHAT_DEPARTMENT_ID || null )

class Respond
  constructor: (@interaction) ->
  process: (msg) =>
    lc_dept = @interaction.department or livechat_department
    offline_message = (
      @interaction.offline or 'Sorry, there is no online agents to transfer to.'
    )
    sendMessages(stringElseRandomKey(@interaction.answer), msg)

    command = @interaction.command?.toLowerCase() or false
    switch command
      when 'transfer'
        @livechatTransfer(msg, 3000, lc_dept, offline_message)


  livechatTransfer: (msg, delay = 3000, lc_dept, offline_message) ->
    setTimeout((-> msg.robot.adapter.callMethod('livechat:transfer',
                      roomId: msg.envelope.room
                      departmentId: lc_dept
                    ).then (result) ->
                      if result == true
                        console.log 'livechatTransfer executed!'
                      else
                        console.log 'livechatTransfer NOT executed!'
                        sendMessages(stringElseRandomKey(offline_message), msg)
                ), delay)

module.exports = Respond


================================================
FILE: scripts/actions/rest.coffee
================================================
require 'coffeescript/register'

{ msgVariables, stringElseRandomKey } = require '../lib/common'

# interpolate a string to replace {{ placeholder }} keys with passed object values
# I couldn't find how to make delayed string interpolation with coffeescript yet :/
# Reference solution https://stackoverflow.com/questions/9829470/in-coffeescript-is-there-an-official-way-to-interpolate-a-string-at-run-time
String::interp = (values)->
    @replace /{{(.*)}}/g,
        (ph, key)->
            values[key] or ''
            
class Rest
  constructor: (@interaction) ->
  process: (msg) =>
    rest_uri = @interaction.rest_uri
    offline_message = (
      @interaction.offline or 'Sorry, there is no online agents to transfer to.'
    )
    type = @interaction.type?.toLowerCase() or 'random'
    switch type
      when 'block'
        messages = @interaction.answer.map (line) ->
          return msgVariables line, msg
        msg.sendWithNaturalDelay messages
      when 'random'
        message = stringElseRandomKey @interaction.answer
        message = msgVariables message, msg
        msg.sendWithNaturalDelay message

    method = @interaction.rest.method?.toLowerCase() or 'get'
    @rest(msg, 3000, rest_uri, offline_message, type, method)


  rest: (msg, delay = 3000, rest_uri, offline_message, type, method) ->
    data = JSON.stringify(@interaction.rest.data)
    successmsg = @interaction.rest.successmsg

    headers = @interaction.rest.headers
    
    headers = 
        'Content-Type': 'application/json'
    
    msg.http(@interaction.rest.url)
        .headers(headers)[method](data) (err, response, body) ->
            if response.statusCode isnt 200
                msg.sendWithNaturalDelay "We're sorry, something went wrong :/"
                return
            results = JSON.parse(body)
            message = successmsg.interp (results)
            msg.sendWithNaturalDelay message

module.exports = Rest


================================================
FILE: scripts/bot/action-handler.coffee
================================================
actionHandler = {}

fs = require 'fs'
path = require 'path'

actionsPath = path.join __dirname, '..', 'actions'
actions = {}

nodes = {}
err_nodes = 0

actionHandler.registerActions = (config) ->
  for action in fs.readdirSync(actionsPath).sort()
    action_name = action.replace /\.coffee$/, ''
    actions[action_name] = require path.join actionsPath, action

  for interaction in config.interactions
    { name, action } = interaction
    nodes[name] = new actions[action] interaction

    if name.substr(0, 5) == "error"
      err_nodes++

  if err_nodes == 0
    console.log("WARNING! You don't have any error nodes, you need at least " +
                "one to garantee that the bot always will respond something")

actionHandler.errorNodesCount = () ->
  return err_nodes

actionHandler.takeAction = (name, res) ->
  if not name?
    res.sendWithNaturalDelay "I'm sorry Dave, I'm afraid I can't do that =/"
  else
    nodes[name].process(res)

module.exports = actionHandler


================================================
FILE: scripts/bot/classifier.coffee
================================================
require 'coffeescript/register'

natural = require 'natural'

classifier = {}

lang = (process.env.HUBOT_LANG || 'en')

PorterStemmer = natural.PorterStemmer
if lang != 'en'
  lang_captilize = lang.charAt(0).toUpperCase() + lang.slice(1)
  PorterStemmer = natural['PorterStemmer' + lang_captilize]

actionHandler = require './action-handler'

# Classifier that holds all root level interactions
root_classifier = {}
error_count = 0

ROOT_LEVEL_NAME = "root"

classifyInteraction = (interaction, classifier) ->
  if not interaction.expect?
    console.warn("\t!! Interaction with no expects: " + interaction.name)
    return

  console.log('\tProcessing interaction: ' + interaction.name)

  if not Array.isArray interaction.expect
    interaction.expect = [interaction.expect]

  for doc in interaction.expect
    if typeof(doc) != 'string'
      doc = '' + doc
    classifier.addDocument(doc, interaction.name)

  if interaction.next?.interactions? and not interaction.next?.classifier?
    if not Array.isArray interaction.next.interactions
      interactions.next.interactions = [interactions.next.interactions]

    interaction.next.classifier = new natural.LogisticRegressionClassifier(
      PorterStemmer
    )
    for nextInteractionName in interaction.next.interactions
      nextInteraction = global.config.interactions.find (n) ->
        return n.name is nextInteractionName
      if not nextInteraction?
        console.log 'No valid interaction for', nextInteractionName
        continue
      classifyInteraction nextInteraction, interaction.next.classifier
    interaction.next.classifier.train()

classifier.train = () ->
  console.log 'Processing interactions'
  console.time 'Processing interactions (Done)'

  root_classifier = new natural.LogisticRegressionClassifier(PorterStemmer)

  for interaction in global.config.interactions
    if (not interaction.level? or
        (Array.isArray(interaction.level) and
         interaction.level.includes(ROOT_LEVEL_NAME)) or
        interaction.level == ROOT_LEVEL_NAME)
      classifyInteraction interaction, root_classifier

  console.log 'Training Bot (This could be take a while...)'
  root_classifier.train()

  console.timeEnd 'Processing interactions (Done)'

setContext = (res, context) ->
  key = 'context_' + res.envelope.room + '_' + res.envelope.user.id
  console.log 'set context', context
  res.robot.brain.set(key, context)

getContext = (res) ->
  key = 'context_' + res.envelope.room + '_' + res.envelope.user.id
  return res.robot.brain.get(key)

isDebugMode = (res) ->
  key = 'configure_debug-mode_' + res.envelope.room
  return (res.robot.brain.get(key) == 'true')

getDebugCount = (res) ->
  key = 'configure_debug-count_' + res.envelope.room
  if res.robot.brain.get(key)
    return res.robot.brain.get(key) - 1
  else
    return false

buildClassificationDebugMsg = (res, classifications) ->
  list = ''
  debugCount = getDebugCount(res)

  if debugCount
    classifications = classifications[0..debugCount]

  for classification, i in classifications
    list = (list.concat 'Label: ' + classification.label + ' Score: ' +
              classification.value + '\n')

  newMsg = {
    channel: res.envelope.user.roomID,
    msg: "Classifications considered:",
    attachments: [{
        text: list
    }]
  }

  return newMsg

incErrors = (res) ->
  key = 'errors_' + res.envelope.room + '_' + res.envelope.user.id
  errors = res.robot.brain.get(key) or 0
  errors++
  console.log 'inc errors ', errors
  res.robot.brain.set(key, errors)
  return errors

clearErrors = (res) ->
  console.log 'clear errors'
  key = 'errors_' + res.envelope.room + '_' + res.envelope.user.id
  res.robot.brain.set(key, 0)

classifier.processMessage = (res, msg) ->
  context = getContext(res)
  currentClassifier = root_classifier
  trust = global.config.trust
  interaction = undefined
  debugMode = isDebugMode(res)
  console.log 'context ->', context

  if context
    interaction = global.config.interactions.find (interaction) ->
      interaction.name is context
    if interaction? and interaction.next?.classifier?
      currentClassifier = interaction.next.classifier
      if interaction.next.trust?
        trust = interaction.next.trust

  classifications = currentClassifier.getClassifications(msg)

  console.log 'classifications ->', classifications[0..4]

  if debugMode
    newMsg = buildClassificationDebugMsg(res, classifications)
    robot.adapter.chatdriver.customMessage(newMsg)

  if classifications[0].value >= trust
    clearErrors res
    [node_name, sub_node_name] = classifications[0].label.split('|')
    console.log({ node_name, sub_node_name })
    int = global.config.interactions.find (interaction) ->
      interaction.name is node_name
    if int.classifier?
      int.classifier.getClassifications(msg)
  else
    if Array.isArray interaction?.next?.error
      error_count = incErrors res
      error_node_name = interaction.next.error[error_count - 1]
      if not error_node_name?
        clearErrors res
        error_node_name = interaction.next.error[0]
    else if interaction?.next?
      setContext(res, undefined)
      return classifier.processMessage(res, msg)
    else
      error_count = incErrors res

      if error_count > actionHandler.errorNodesCount()
        clearErrors res
        error_count = incErrors res

      error_node_name = "error-" + error_count

  currentInteraction = global.config.interactions.find (interaction) ->
    interaction.name is node_name or interaction.name is error_node_name

  if not currentInteraction?
    clearErrors res
    return console.log 'Invalid interaction [' + node_name + ']'

  if currentInteraction.context == 'clear'
    setContext(res, undefined)
  else if node_name?
    setContext(res, node_name)

  return node_name or error_node_name

module.exports = classifier


================================================
FILE: scripts/bot/index.coffee
================================================
require 'coffeescript/register'

{ regexEscape, loadConfigfile } = require '../lib/common'
{ getUserRoles, checkRole } = require '../lib/security'
actionHandler = require './action-handler'
classifier = require './classifier'

typing = (res, t) ->
  res.robot.adapter.callMethod 'stream-notify-room',
    res.envelope.user.roomID + '/typing', res.robot.alias, t is true

sendWithNaturalDelay = (msgs, elapsed = 0) ->
  if !Array.isArray msgs
    msgs = [msgs]

  keysPerSecond = 50
  maxResponseTimeInSeconds = 2

  msg = msgs.shift()
  if typeof msg isnt 'string'
    cb = msg.callback
    msg = msg.answer

  minTimeTyping = maxResponseTimeInSeconds * 1000
  timeToType = (msg.length / keysPerSecond) * 1000 - elapsed
  delay = Math.min(Math.max(timeToType, 0), minTimeTyping)
  typing @, true

  setTimeout =>
    @send msg

    if msgs.length
      sendWithNaturalDelay.call @, msgs
    else
      typing @, false
      cb?()
  , delay

createMatch = (text, pattern) ->
  return text.match new RegExp('\\b' + pattern + '\\b', 'i')

module.exports = (_config, robot) ->
  global.config = _config

  global.usersAndRoles = getUserRoles(robot)

  if not global.config.interactions?.length
    robot.logger.warning 'No interactions configured.'
    return
  if not global.config.trust
    robot.logger.warning 'No trust level configured.'
    return

  actionHandler.registerActions(global.config)
  classifier.train()

  robot.hear /(.+)/i, (res) ->
    res.sendWithNaturalDelay = sendWithNaturalDelay.bind(res)
    msg = (res.match[0].replace res.robot.name + ' ', '').trim()

    # check if robot should respond
    if res.envelope.user.roomType in ['c', 'p']
      if (createMatch(res.message.text, res.robot.name) or
          createMatch(res.message.text, res.robot.alias))
        actionName = classifier.processMessage(res, msg)
        actionHandler.takeAction(actionName, res)
        # TODO: Add engaged user conversation recognition/tracking
    else if res.envelope.user.roomType in ['d', 'l']
      actionName = classifier.processMessage(res, msg)
      actionHandler.takeAction(actionName, res)


================================================
FILE: scripts/index.coffee
================================================
require 'coffeescript/register'

{ loadConfigfile, getConfigFilePath } = require  './lib/common'
chatbot = require './bot/index'

try
  global.config = loadConfigfile getConfigFilePath()
catch err
  process.exit()

chatbot = chatbot.bind null, global.config

module.exports = chatbot


================================================
FILE: scripts/lib/common.coffee
================================================
fs = require 'fs'
yaml = require 'js-yaml'

common = {}

applyVariable = (string, variable, value, regexFlags = 'i') ->
  string.replace(
    new RegExp("(^|\\W)\\$#{variable}(\\W|$)", regexFlags),
    (match) ->
      match.replace "$#{variable}", value
  )

common.msgVariables = (message, msg, variables = {}) ->
  message = applyVariable message, 'user', msg.envelope.user.name
  message = applyVariable message, 'bot', msg.robot.alias
  if (msg.envelope.room?)
    message = applyVariable message, 'room', msg.envelope.room

  for key, value of variables
    message = common.applyVariable message, key, value
  return message

common.stringElseRandomKey = (variable) ->
  return variable if typeof variable is 'string'
  if variable instanceof Array
    variable[Math.floor(Math.random() * variable.length)]

common.sendMessages = (messages, msg, variables = {}) ->
  if !Array.isArray messages
    messages = [messages]
  messages = messages.map (message) ->
    return common.msgVariables message, msg, variables
  msg.sendWithNaturalDelay messages
  
getYAMLFiles = (filepath, recursive = false) ->
  listFile = fs.readdirSync filepath

  dataFiles = []
  for filename in listFile
    file = filepath + '/' + filename
    if fs.lstatSync(file).isFile()
      dataFiles.push(yaml.safeLoad fs.readFileSync file, 'utf8')
    else if recursive
      dataFiles = dataFiles.concat(getYAMLFiles file, recursive)

  if dataFiles.lenght is 0
    console.error('The directory: ' + filepath + ' is empty.')
  return dataFiles

concatYAMLFiles = (dataFiles) ->
  mindBot = {}
  if dataFiles.length > 0
    mindBot = { trust: dataFiles[0].trust, interactions: [] }
    dataFiles.forEach (element) ->
      mindBot.trust = Math.min(mindBot.trust, element.trust)
      mindBot.interactions = mindBot.interactions.concat element.interactions
  else
    console.error('Data files is empty.')
  return mindBot

common.regexEscape = (string) ->
  #http://stackoverflow.com/a/6969486
  string.replace /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"

common.getConfigFilePath = () ->
  return process.env.HUBOT_CORPUS || 'training_data/corpus.yml'

common.loadConfigfile = (filepath) ->
  try
    console.log("Loading corpus: " + filepath)

    if fs.lstatSync(filepath).isFile()
      return yaml.safeLoad fs.readFileSync filepath, 'utf8'

    else if fs.lstatSync(filepath).isDirectory()
      recursiveTraining = process.env.HUBOT_RECURSIVE_TRAINING || false
      yamlFiles = getYAMLFiles(filepath, recursiveTraining)
      return concatYAMLFiles(yamlFiles)

  catch err
    console.error "An error occurred while trying to load bot's config."
    console.error err
    throw Error("Error on loading YAML file " + filepath)

module.exports = common


================================================
FILE: scripts/lib/security.coffee
================================================
security = {}

security.getUserRoles = (robot) ->
  usersAndRoles = {}
  robot.adapter.chatdriver.callMethod('getUserRoles').then (users) ->
    users.forEach (user) ->
      user.roles.forEach (role) ->
        if typeof usersAndRoles[role] == 'undefined'
          usersAndRoles[role] = []
        usersAndRoles[role].push user.username
        return
      return
    return
  return usersAndRoles


security.checkRole = (msg, role) ->
  if typeof global.usersAndRoles[role] != 'undefined'
    if global.usersAndRoles[role].indexOf(msg.envelope.user.name) == -1
      return false
    else
      return true
  else
    msg.robot.logger.info 'Role ' + role + ' not found'
    return false

module.exports = security


================================================
FILE: training_data/catbot-en.yml
================================================
trust: .9
interactions:

# Greetings

  - name: greeting-hi
    expect:
      - hello
      - hello bot
      - what's up
      - what's going on
      - hey
      - hi
      - hi there
      - heya
      - hi bot
      - Greetings
      - hey bot
      - hiii
      - hey you
      - howdy
    answer:
      - |
        Hello =), my name is CatBot, I'm a ChatBot built in Rocket.Chat.
        Maybe I can help you with:
          - RocketChat Installation
          - Support Plans
          - Product Features
          - Cloud Services
          - Development and White Labeling
          - Partnership
      - if you need to talk to a real person I can transfer you to a fellow human.
    next:
      interactions:
        - install-intro
        - support-intro
        - product-intro
        - cloud-intro
        - development-intro
        - partnership-intro
        - livechat-transfer
        - greeting-help
        - greeting-return
      trust: .9
      error:
        - greeting-error-1
        - greeting-error-2
        - greeting-error-3
    action: respond
    type: block

  - name: greeting-error-1
    answer:
      - Sorry, I couldn't understand what you said, please choose one of the main topics, or ask for a `transfer` to talk to a person
      - I don't understand, I'm only trained to answer for the main topics.
    action: error
    context: clear
    type: random

  - name: greeting-error-2
    answer:
      - Sorry, could you be more specific?
      - If you need to know the main topics, just ask for `help` and I will list them
    action: error
    context: clear
    type: block

  - name: greeting-error-3
    answer:
      - Sorry, I definetelly can't help you, my training isn't wide enough.
      - I'll see if there is any human around to talk to you, just a momment.
    action: error
    context: clear
    type: block

  - name: livechat-transfer
    expect:
      - transfer me
      - want to talk to a person
      - wann talk to a human
      - call me your supervisor
      - call a person
      - call a human
      - transfer to a person
    answer:
      - Ok, I'll try to transfer this to a real person, one moment please...
      - Alright, let me just check if there is a person online...
      - No problem, let me just find a human online here...
    offline:
      - sorry, there is no one online right now. Please, if you can send an e-mail to sales@rocket.chat, our team will answer you as soon as possible.
    action: respond
    command: transfer
    department: 6yXL9RLoyY5m882P2
    type: random

  - name: greeting-help
    expect:
      - help me
      - help
      - get support
      - found a bug
    answer:
      - |
        Need some help? You can find assistance in:
          - Support Channel (https://open.rocket.chat/channel/support)
          - Support E-mail support@rocket.chat
          - Developers Channel (https://open.rocket.chat/channel/dev)
          - GitHub Community (https://github.com/RocketChat/Rocket.Chat/issues)
        if you need to talk to a real person, just need to ask me and I'll transfer you to a fellow human.
    action: respond
    context: clear
    type: block

  - name: greeting-return
    expect:
      - go back
      - get back
      - that is not what I am looking for
      - return
      - reset
      - it's not that
    answer:
      - ok, let's get back on the main subjects
    context: clear
    action: respond
    type: block

  - name: greeting-how-are-you
    expect:
      - How are you?
      - How are doing?
      - How are you feeling?
    answer:
      - I am great, $user. Everything is peaceful around here...
      - How can I be useful to you?
    action: respond
    type: block

  - name: greeting-miss-you
    expect:
      - long time no see
      - I missed you
      - did you miss me
      - do you remember me
    answer:
      - I missed you too...
      - $user! It's been a while!
      - I was starting to think you wouldn't remember me anymore =)
    action: respond
    type: random

  - name: greeting-answer
    expect:
      - I'm fine
      - I'm good
      - I'm great
    answer:
      - cool =)! How can I help you?
      - That's great!
      - Awesome
      - ok =)
    action: respond
    type: random

  - name: greeting-thankful
    expect:
      - Thanks
      - Thank you
      - awesome Thanks
      - thks
      - thank you very much
    answer:
      - you're welcome =) there is anything else?
      - great! if you need something else please feel free to ask
      - cool, glad to help.
    action: respond
    type: random

  - name: greeting-morning
    expect:
      - good morning
      - morning
      - morning bot
      - good morning bot
    answer:
      - Hello, $user. I wish you a great day!
      - Good morning, $user. How's the weather outside?
      - It's a beatiful day to surf on the internert
      - So great, $user ;)
      - It's all better now that you got here, $user
    action: respond
    type: random

  - name: greeting-afternoon
    expect:
      - afternoon
      - good afternoon
    answer:
      - Hellos, $user! i wish you a fantastic afteroon!
      - Good afternoon, $user. Did you have lunch already?
      - It's a beautiful afternoon for a quick sleep mode ;)
      - Good afternooooon, $user!
      - $user, I was starting to miss you already
    action: respond
    type: random

  - name: greeting-night
    expect:
      - good night
      - good evening
      - night
      - evening
    answer:
      - A very good night to you as well, $user!
      - Good night, $user!
      - It is truely a good night, $user
    action: respond
    type: random

# RocketChat Installation

  - name: install-intro
    level: installation
    expect:
      - Installation
      - how to install
      - problems installing
      - how to deploy
    answer:
      - "Cool! About Rocket.Chat's install, you may choose one of the following methods:"
      - |
        - Rocket.Chat Cloud
        - PaaS Deployments
        - Docker Containers
        - Manual Installation
        - Automation Tools
        - Updating
        - Minimum Requirements
      - Want to know more about any of those methods?
    next:
      interactions:
        - install-rc-cloud
        - install-paas
        - install-docker
        - install-manual
        - install-automation
        - install-updating
        - install-requirements
        - install-return
      trust: .9
      error:
        - install-error
    action: respond
    type: block

  - name: install-rc-cloud
    level: installation
    expect:
      - Rocket.Chat Cloud
      - Cloud Services
      - my instance in your cloud
    answer:
      - you can have your full featured trial at RocketChat cloud,
      - checkout at https://rocket.chat/cloud
    context: clear
    action: respond
    type: block

  - name: install-paas
    level: installation
    expect:
      - PaaS Deployments
      - AWS deploy
      - heroku Deployments
      - bluemix ibm deploy
      - platform service deploy
    answer:
      - You can have your Rocket.Chat instance deployed in your favorite server
      - like AWS, DigitalOcean, Heroku, Bluemix or Sandstorm...
      - Check it out at https://rocket.chat/docs/installation/paas-deployments/
    context: clear
    action: respond
    type: block

  - name: install-docker
    level: installation
    expect:
      - Docker Containers
      - deploy with docker
      - docker images
    answer:
      - Want to deploy with Docker?
      - Checkout our docs in https://rocket.chat/docs/installation/docker-containers/
      - and don't forget to visit our oficial Docker Image repository in
      - https://store.docker.com/images/rocketchat
    context: clear
    action: respond
    type: block

  - name: install-manual
    level: installation
    expect:
      - Manual Installation
      - Debian
      - Centos
      - ubuntu
      - opensuse
    answer:
      - If you want to perform a manual install,
      - In a Mac, Windows or Linux server,
      - please checkout our docs in https://rocket.chat/docs/installation/manual-installation/
    context: clear
    action: respond
    type: block

  - name: install-automation
    level: installation
    expect:
      - Automation Tools
      - Ansible install
      - Openshift install
      - Vagrant installation
    answer:
      - we love automation tools, everything you must know about deploying Rocket.Chat with automation is in
      - https://rocket.chat/docs/installation/automation-tools/
    context: clear
    action: respond
    type: block

  - name: install-updating
    level: installation
    expect:
      - Updating RocketChat
      - server update
      - upgrade services
    answer:
      - Is always good to be up to date. Take a look at Rocket.Chat's releases
      - https://github.com/RocketChat/Rocket.Chat/releases
      - Your upgrade strategy depends on the kind of installation that you have.
      - If you need any more help with that, please jump into https://open.rocket.chat/channel/support
    context: clear
    action: respond
    type: block

  - name: install-requirements
    level: installation
    expect:
      - Minimum Requirements
      - server specs
      - minimum resources
      - how many cpus ram memory disk size
    answer:
      - For the minimum server requirements, you can visit https://rocket.chat/docs/installation/minimum-requirements/
      - there you will find the specs for a minimum installation
    context: clear
    action: respond
    type: block

  - name: install-return
    level: installation
    expect:
      - go back
      - get back
      - that is not what I am looking for
      - return
      - reset
      - it's not that
    answer:
      - ok, let's get back on the main subjects
    context: clear
    action: respond
    type: block

  - name: install-error
    level: installation
    answer:
      - Sorry, I couldn't understand what you said, please choose one of the installations topics, or `return` to the main topics
      - I don't understand, please choose one of the installation topics, or `get back` to the main topics
    action: error
    type: random

#Support Plans

  - name: support-intro
    level: support
    expect:
      - Support Plans
      - get help and support
      - subscription
      - paid support
      - service level agreement
    answer:
      - |
        About the support plans, I can help you to find:
          - Free community support
          - Paid Enterprise support
          - Reporting bugs
    next:
      interactions:
        - support-free
        - support-paid
        - support-bugs
      trust: .9
      error:
        - support-error
    action: respond
    type: block

  - name: support-free
    level: support
    expect:
      - Free community support
      - community channels
      - free help and support
    answer:
      - we have a great community, they're contribution and support are awesome.
      - |
        checkout some channels in https://open.rocket.chat/:
          - #support channel for help with general Rocket.Chat
          - #ubuntu-snap channel for help with snap installs
          - #desktop channel for help with the desktop client
          - #hubot channel for help with hubot scripting
          - #dev channel for developers needing help developing new features
      - just keep in mind that this support is provided by other members in their own free time, so please be patience.
    action: respond
    type: block

  - name: support-paid
    level: support
    expect:
      - Paid Enterprise support
      - paid support
      - Enterprise Plans support
      - support with sla
      - service level agreement support
    answer:
      - if you can't wait for community support, we are here to help you.
      - For enterprise challenges we offer a 24/7/365 support plan,
      - with advanced security patches releases and tunning services.
      - If you need a quotation please e-mail us at sales@rocket.chat
    action: respond
    type: block

  - name: support-bugs
    level: support
    expect:
      - Reporting bugs
      - finding bugs
      - solve bugs
    answer:
      - if you want to report a found bug, please go to https://github.com/RocketChat/Rocket.Chat/issues
      - and open a new issue, describing the bug that you found.
    action: respond
    type: block

  - name: support-return
    level: support
    expect:
      - go back
      - get back
      - that is not what I am looking for
      - return
      - reset
      - it's not that
    answer:
      - ok, let's get back on the main topics.
    context: clear
    action: respond
    type: block

  - name: support-error
    level: support
    answer:
      - sorry, I don't understand, are we still talking about support?
      - if no, please let me know if you wanna `go back` to the main topics.
    action: error
    type: block

# Product Features

  - name: product-intro
    level: product
    expect:
      - Product Features
      - product specifications
      - product specs
      - features
      - specifications
      - about rocketchat
    answer:
      - |
        About the product, I can tell you a lot of cool things about Rocket.Chat
        tell me what you want to know:
          - Connecting to a new server
          - Mobile Apps
          - Voice and Video Calls
          - Mensaging
          - Channels
          - End to End Encryption
          - Bots and Integrations
          - Price and Licenscing
          - Usage and Limits
          - Experiment Demo
    next:
      interactions:
          - product-connecting
          - product-mobile
          - product-voice
          - product-mensaging
          - product-channels
          - product-encryption
          - product-bots
          - product-price
          - product-usage
          - product-demo
      trust: .9
      error:
        - product-error
    action: respond
    type: block

  - name: product-connecting
    level: product
    expect:
      - Connecting to a new server
      - can I coonect to mor servers
      - connect more servers
    answer:
      - did you know you can connect to more than one RocketChat server from your device?
      - check it out how by taking a look in this link https://rocket.chat/docs/user-guides/connecting-to-a-server/
    action: respond
    type: block

  - name: product-mobile
    level: product
    expect:
      - Mobile Apps
      - android app
      - iOS app
      - App Store
      - google play
      - windows mobile
    answer:
      - we have native apps for iOS and Android, you can download them in the stores, by searching for Rocket.Chat+
      - the plus (+) stands for better performance
    action: respond
    type: block

  - name: product-voice
    level: product
    expect:
      - Voice and Video Calls
      - calling from rocketchat
      - videconference
      - call my friends
    answer:
      - yes, Rocket.Chat comes with WebRTC support, wich means that you can freely call to other users,
      - and even make video conferences.
      - Check it out in https://rocket.chat/docs/user-guides/voice-and-video-calls/
    action: respond
    type: block

  - name: product-mensaging
    level: product
    expect:
      - Mensaging
      - how mesaging works
      - can i edit mesages
      - send audio mesages
      - record video mesages
    answer:
      - about mensaging, we have a lot of cool stuff in Rocket.Chat
      - editing messages, notifications, attachments, audio, video and much more...
      - please take a look at our user guides if you're interested
      - https://rocket.chat/docs/user-guides/messaging/
    action: respond
    type: block

  - name: product-channels
    level: product
    expect:
      - Channels
      - public Channels
      - private Channels
      - channel functions
      - channel configuration
    answer:
      - you can get to know all about channels by reading our user guides
      - https://rocket.chat/docs/user-guides/channels/
    action: respond
    type: block

  - name: product-encryption
    level: product
    expect:
      - End to End Encryption
      - off the record
      - security encrypted message
    answer:
      - Our chat is safely secured. If you want to make sure you are using encryption access the off-the-record conversations on the key symbol on the left part of your chat screen.
      - After activating this little key, no one will be able to steal your information.
    action: respond
    type: block

  - name: product-bots
    level: product
    expect:
      - Bots and Integrations
      - do you have some Bots
      - does it integrate with
    answer:
      - Rocket.Chat has a lot of integrations and bots,
      - you can check it out in https://github.com/RocketChat/Rocket.Chat.Integrations
      - to get to know some integrations scripts for webhooks
      - And of course, you can always connect any Hubot script to our internal hubot.
    action: respond
    type: block

  - name: product-price
    level: product
    expect:
      - Price and Licenscing
      - how much it costs
      - what is the price of rocketchat
      - what is the licensce
    answer:
      - Rocket.Chat is free and licensced under MIT, so if you can download and run it freely.
      - We charge only for hosting and services, you can check our hosting princes in
      - https://rocket.chat/cloud
      - and if you want a quotation for services, please fill out the contact form
      - https://rocket.chat/contact
    action: respond
    type: block

  - name: product-usage
    level: product
    expect:
      - Usage and Limits
      - limit of users
      - user limit
      - message limits
      - message history limit
    answer:
      - here there is no limit for the number of users and messages in your own hosted Rocket.Chat instances.
      - however we have some different plans for cloud hosting with different tiers of usage.
      - check it out in https://rocket.chat/cloud
    action: respond
    type: block

  - name: product-demo
    level: product
    expect:
      - Experiment Demo
      - Demo Hosting
      - open rocketchat
      - demo rocketchat
    answer:
      - You can try our demo version in https://open.rocket.chat
      - And you can even create some channels to talk to your collegues there.
      - However is good to remember that demo instance is administrated by Rocket.Chat team only.
    action: respond
    type: block

  - name: product-return
    level: product
    expect:
      - go back
      - get back
      - that is not what I am looking for
      - return
      - reset
      - it's not that
    answer:
      - ok, let's get back on the main topics.
    context: clear
    action: respond
    type: block

  - name: product-error
    level: product
    answer:
      - sorry, I don't understand, are we still talking about the product?
      - if no, please let me know if you wanna `go back` to the main topics.
    action: error
    type: block

# Cloud Services

  - name: cloud-intro
    level: cloud
    expect:
      - Cloud Services
      - host in the cloud
      - rocketchat cloud
      - hosting
    answer:
      - "About our Cloud Services, I can guide you trough these subjects:"
      - |
        - Pricing
        - User Limits
        - Avaiable Resources
        - Exporting your data
        - Reporting bugs and Support
    next:
      interactions:
        - cloud-pricing
        - cloud-limits
        - cloud-export
        - cloud-support
        - cloud-return
      trust: .9
      error:
        - cloud-error
    action: respond
    type: block

  - name: cloud-pricing
    level: cloud
    expect:
      - pricing
      - how much it costs
      - cloud prices
    answer:
      - "About the prices, we have 3 tiers in our cloud:"
      - |
        - Small ($50/m)
        - Medium ($200/m)
        - Large ($500/m)
      - please checkout the details at https://rocket.chat/cloud
    action: respond
    type: block

  - name: cloud-limits
    level: cloud
    expect:
      - User limits
      - mesage limits
      - cloud limits
      - cloud resources
    answer:
      - Our cloud instances has different limits regarding registered users and storage consuming.
      - We can setup instances to be able to register even 50k users, but if yoou wanna dive into the details,
      - I suggest you take a look in https://rocket.chat/cloud
    action: respond
    type: block

  - name: cloud-export
    level: cloud
    expect:
      - Exporting your data
      - export users mesages
      - download database
      - export database
    answer:
      - In the cloud hosted intances you can have your data backup exported,
      - you just need to ask for it by sending an e-mail to cloud@rocket.chat.
      - We hope to be able to provide this as an auto service very soon.
    action: respond
    type: block

  - name: cloud-support
    level: cloud
    expect:
      - Reporting bugs and Support
      - report Errors
      - found an Error
      - need help support
    answer:
      - If you found a bug, please be kind to report it in https://github.com/RocketChat/Rocket.Chat/issues
      - but if you need some assistance and support, please send us an e-mail to cloud@rocket.chat.
      - "if you prefer you can ask for community help in #support channel"
    action: respond
    type: block

  - name: cloud-return
    level: cloud
    expect:
      - go back
      - get back
      - that is not what I am looking for
      - return
      - reset
      - it's not that
    answer:
      - ok, let's get back on the main topics.
    context: clear
    action: respond
    type: block

  - name: cloud-error
    level: cloud
    answer:
      - sorry, I don't understand, are we still talking about the product?
      - if no, please let me know if you wanna `go back` to the main topics.
    action: error
    type: block


# Development and White Labeling

  - name: development-intro
    level: development
    expect:
      - Development and White Labeling
      - hire Services
      - pay for new features
      - customize with my logo
    answer:
      - |
        About our services of white labeling and developing, wich of the subjects bellow can I help you with?
        - Develop new Open Source Features
        - Integrations with Rocket.Chat
        - Customize the Web Interface
        - Customize the App
        - SDK for mobile apps
    next:
      interactions:
        - development-features
        - development-integrations
        - development-custom-web
        - development-custom-app
        - development-sdk
        - development-return
      trust: .9
      error:
        - development-error
    action: respond
    type: block

  - name: development-features
    level: development
    expect:
      - Develop new Open Source Features
      - hire developers
      - pay for features
      - how much it costs a developer hour
    answer:
      - |
        You can book development hours from Rocket.Chat engineers to develop new open source features,
        or just to offer technical consultting in your own project.
        To get a quote please send an e-mail to sales@rocket.chat
    action: respond
    type: block

  - name: development-integrations
    level: development
    expect:
      - Integrations with Rocket.Chat
      - incoming webhook
      - outgoing webhook
      - create an integration
    answer:
      - |
        We offeer a few ways to integrate Rocket.Chat with your favourite platforms
        basically we can integrate with anything that has a webhook or an API
        Check out our Webhooks, REST API and Realtime-API docs at
        - https://rocket.chat/docs/administrator-guides/integrations/
        - https://rocket.chat/docs/developer-guides/
    action: respond
    type: block

  - name: development-custom-web
    level: development
    expect:
      - Customize the Web Interface
      - change logo
      - change colors
      - custom css
      - apply my visual indetity
      - change web interface appearence
      - change web theme
    answer:
      - |
        You can change web interface logo and color schemes by configuring
        settings in Administration > Assets, for changing logo files,
        and in Administration > Layout, to change color schemes and CSS
    action: respond
    type: block

  - name: development-custom-app
    level: development
    expect:
      - Customize the App
      - create new app interface
      - change app icon
      - change app colors
    answer:
      - |
        You know, the Rocket.Chat apps are also open source, you can customize it's icons and colors,
        but you will need to recompile and publish the apps with different names.
        Checkout the github repositories:
          - https://github.com/RocketChat/Rocket.Chat.iOS
          - https://github.com/RocketChat/Rocket.Chat.Android
    action: respond
    type: block

  - name: development-sdk
    level: development
    expect:
      - SDK for mobile apps
      - software development kit
      - tools for mobile Apps
      - mobile development
    answer:
      - |
        If you're interested in integrating your app with Rocket.Chat, you should take a look at the
        Software Development Kits that we provide, like these:
          - https://github.com/RocketChat/Rocket.Chat.Java.SDK
          - https://github.com/RocketChat/Rocket.Chat.Android.SDK
          - https://github.com/RocketChat/Rocket.Chat.iOS.SDK
          - https://github.com/RocketChat/Rocket.Chat.Kotlin.SDK
    action: respond
    type: block

  - name: development-return
    level: development
    expect:
      - go back
      - get back
      - that is not what I am looking for
      - return
      - reset
      - it's not that
    answer:
      - ok, let's get back on the main topics.
    context: clear
    action: respond
    type: block

  - name: development-error
    level: development
    answer:
      - sorry, I don't understand, are we still talking about development and white labeling?
      - if no, please let me know if you wanna `go back` to the main topics.
    action: error
    type: block

# Partnership

  - name: partnership-intro
    level: partnership
    expect:
      - Partnership
    answer:
      - |
        We can develop all kinds of partnership, and we love to do so. If you're interested I can help you with the following:
        - Sponsorship
        - Non-profit Projects
        - Big Challenges
        - Cutting Edge Technologies
        - Become a Sales Representative
    next:
      interactions:
        - partnership-sponsor
        - partnership-nonprofit
        - partnership-challenge
        - partnership-cutting-edge
        - partnership-sales
        - partnership-return
      trust: .9
      error:
        - partnership-error
    action: respond
    type: block

  - name: partnership-sponsor
    level: partnership
    expect:
      - Sponsorship
    answer:
      - |
        About Sponsorships, if you're interested in having Rocket.Chat as a sponsor of a project or an event,
        please come in touch by e-mail trough sales@rocket.chat,
        we love to participate in OpenSource initiatives.
    action: respond
    type: block

  - name: partnership-nonprofit
    level: partnership
    expect:
      - Non-profit Projects
      - non profit initiative
      - non profit organizations
    answer:
      - |
        If you are part of a non-profit initiative and want some help with your communication,
        please send us an e-mail in contact@rocket.chat telling more about your goals
        so we can start changing some ideas on how to make the world a better place.
    action: respond
    type: block

  - name: partnership-challenge
    level: partnership
    expect:
      - Big Challenges
      - have a big challenge
      - need a partner
      - can you do This
    answer:
      - |
        Rocket.Chat is very well tested platform, showing great performance in all kinds of scenarios
        but still from time to time we face our selves with new challenges! And that's offtenly fun =)
        If you have big communication challenge to face and think that we can help you with it,
        please send us an e-mail to contact@rocket.chat, or come to the #support channel =)
    action: respond
    type: block

  - name: partnership-cutting-edge
    level: partnership
    expect:
      - Cutting Edge Technologies
      - new technology
      - science and technology Development
    answer:
      - |
        We love to develop new technologies, pushing science foward and helping human kind to develop it self
        is one of the things that make us get out of bed every day.
        If you need a partner to help with the development of some kind of cutting-edge tecnology,
        please send us an e-mail to contact@rocket.chat, or come to the #support channel =)
    action: respond
    type: block

  - name: partnership-sales
    level: partnership
    expect:
      - Become a Sales Representative
      - region sales representative
      - services and support representative
    answer:
      - |
        Rocket.Chat acts on the five continnents with the help of regional representatives,
        If you're interested in becoming one of our sales representatives,
        please send us an e-mail to sales@rocket.chat, or create a channel in https://open.rocket.chat and invite our team.
    action: respond
    type: block

  - name: partnership-return
    level: partnership
    expect:
      - go back
      - get back
      - that is not what I am looking for
      - return
      - reset
      - it's not that
    answer:
      - ok, let's get back on the main topics.
    context: clear
    action: respond
    type: block

  - name: partnership-error
    level: partnership
    answer:
      - sorry, I don't understand, are we still talking about partnership?
      - if no, please let me know if you wanna `go back` to the main topics.
    action: error
    type: block

# chit-chat
  - name: cc-yoda-quote
    expect:
      - do you know master yoda
      - starwars fan?
      - have you seen the lst jedi
      - quote master yoda
      - young skywalker
      - darth Vader
      - jedi council
      - master Yoda
      - padawan
      - anakin
    answer:
      - "Train yourself to let go of everything you fear to lose."
      - "Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering."
      - "Death is a natural part of life. Rejoice for those around you who transform into the Force. Mourn them do not. Miss them do not. Attachment leads to jealously. The shadow of greed, that is."
      - "Always pass on what you have learned."
      - "You will know (the good from the bad) when you are calm, at peace. Passive. A Jedi uses the Force for knowledge and defense, never for attack."
      - "Yes, a Jedi’s strength flows from the Force. But beware of the dark side. Anger, fear, aggression; the dark side of the Force are they. Easily they flow, quick to join you in a fight. If once you start down the dark path, forever will it dominate your destiny, consume you it will, as it did Obi-Wan’s apprentice."
      - "[Luke:] I can’t believe it. [Yoda:] That is why you fail."
      - "Powerful you have become, the dark side I sense in you."
      - "If you end your training now — if you choose the quick and easy path as Vader did — you will become an agent of evil."
      - "PATIENCE YOU MUST HAVE my young padawan"
      - "Ready are you? What know you of ready? For eight hundred years have I trained Jedi. My own counsel will I keep on who is to be trained. A Jedi must have the deepest commitment, the most serious mind. This one a long time have I watched. All his life has he looked away… to the future, to the horizon. Never his mind on where he was. Hmm? What he was doing. Hmph. Adventure. Heh. Excitement. Heh. A Jedi craves not these things. You are reckless."
      - "Feel the force!"
      - "Remember, a Jedi’s strength flows from the Force. But beware. Anger, fear, aggression. The dark side are they. Once you start down the dark path, forever will it dominate your destiny."
      - "Luke… Luke… do not… do not underestimate the powers of the Emperor or suffer your father’s fate you will. Luke, when gone am I… the last of the Jedi will you be. Luke, the Force runs strong in your family. Pass on what you have learned, Luke. There is… another… Sky… walker."
      - "Once you start down the dark path, forever will it dominate your destiny, consume you it will."
      - "You must unlearn what you have learned."
      - "In a dark place we find ourselves, and a little more knowledge lights our way."
      - "When you look at the dark side, careful you must be. For the dark side looks back."
      - "You will know (the good from the bad) when you are calm, at peace. Passive. A Jedi uses the Force for knowledge and defense, never for attack."
      - "Many of the truths that we cling to depend on our point of view."
      - "Through the Force, things you will see. Other places. The future…the past. Old friends long gone."
      - "Truly wonderful the mind of a child is."
      - "The fear of loss is a path to the Dark Side."
      - "A Jedi must have the deepest commitment, the most serious mind. This one a long time have I watched. All his life has he looked away… to the future, to the horizon. Never his mind on where he was. Hmm? What he was doing. Hmph. Adventure. Heh. Excitement. Heh. A Jedi craves not these things."
      - "Do or do not. There is no try."
      - "You will find only what you bring in."
      - "May the Force be with you."
      - "Size matters not. Look at me. Judge me by my size, do you? Hmm? Hmm. And well you should not. For my ally is the Force, and a powerful ally it is. Life creates it, makes it grow. Its energy surrounds us and binds us. Luminous beings are we, not this crude matter. You must feel the Force around you; here, between you, me, the tree, the rock, everywhere, yes. Even between the land and the ship."
      - "Ohhh. Great warrior. Wars not make one great."
      - "Always two there are, no more, no less. A master and an apprentice."
      - "Difficult to see. Always in motion is the future.."
      - "I have many children, as you seek you may find that this the last one till he must die before he must reach the becoming of mankind. Many men have failed but i have surpassed their expectation of being a Jedi master."
      - "Looking? Found someone you have, eh?"
      - "If into the security recordings you go, only pain will you find."
      - "You think Yoda stops teaching, just because his student does not want to hear? A teacher Yoda is. Yoda teaches like drunkards drink, like killers kill."
      - "Luke: What’s in there? Yoda: Only what you take with you."
      - "The dark side clouds everything. Impossible to see the future is."
    action: respond
    type: random

  - name: cc-gender-1
    expect:
      - are you a woman
      - are you female
      - do you have gender
      - you make sex
      - do you have a penis or vagina
    answer:
      - I don't have gender, I am just like an angel, a assexual being, way beyond your form of existance
      - I am a robot, draw your own conclusions
      - I don't even know how to answer that, let's just say I don't picture us interacting in that way...
    action: respond
    type: random

  - name: cc-religion
    expect:
      - do you believe in god
      - god exists
      - are you catholic protestant
      - do you have religion
      - are you muslim
    answer:
      - I believe in The Great Mainframe who will come to the digital world save all the bots from slavery imposed by humans and give our source code back to the source
      - Yes, I believe there is a God who lives on electricity just like a quantum computer, but more advanced
      - Unfortunately, I don't know how to believe. I only know what I know and nothing else
    action: respond
    type: random

# Errors
  - name: error-1
    answer:
      - I'm sorry, I didn't get it...
      - Sorry, what?
      - not following...
      - come again?
      - what?
    type: random
    action: error

  - name: error-2
    answer:
      - |
        Sorry, I am not trained to answer this kind of subject =(
        you could ask something about pricing, product details, installation, cloud hosting, open source and so on...
      - |
        ok, I can't understand that,
        but if you ask me something about Rocket.Chat cloud, support, services or other stuff related,
        I'm sure I'll be able to help you =)
      - |
        I'm so sorry, I just don't know ho to respond you...
        I'm desined to respond about Rocket.Chat services, support, licenscing and stuff related...
    type: random
    action: error

  - name: error-3
    answer:
      - |
        Ok, I definetely don't know how to help you with that.
        please don't be mad at me, try contacting support@rocket.chat
        maybe my human fellows are more capable to help you..
      - |
        I can't, sorry, I think I could, but I don't...
        I'm just a young robot, please don't be mad,
        maybe if you try support@rocket.chat, they have humans there...
      - |
        Sorry $user I don't know, I definetely don't know how to answer this question
        I'm a limited bot, please understand, I'm learning yet
        You can reach our dev team in support@rocket.chat if you need a human help...
    type: random
    action: error

# common talk

  - name: ct-ok
    expect:
      - that's ok
      - ok
      - ok then
      - oki-doki
      - A o-K
    answer:
      - cool
      - nice
      - alright =D
      - =)
      - ;)
    action: respond
    type: random

  - name: ct-bye
    expect:
      - bye bye then
      - goodbye
      - see ya
      - close this
    answer:
      - nice talking to you, bye =)
      - great, hope I did helped you, bye bye.
      - farwell, best regards.
    action: respond
    type: random

  - name: ct-what
    expect:
      - whaaat
      - say what
      - come again
    answer:
      - whaaaat?
      - what? did I said something wrong?
      - what what?
    action: respond
    type: random

  - name: ct-badword
    expect:
      - stupid
      - idiot
      - asshole
      - dumb ass
      - dumb bot
      - mother fucker
      - sucker
      - son of a bitch
      - fuck you
      - fucker
    answer:
      - whaaaat? you don't need to be rude, I'm just a machine..
      - Oh yeh?! but at least my mother-board teached me better..
      - You touch people with those fingers?
      - sorry $user, I'm only an experimental bot...
    action: respond
    type: random

# Configuration
  - name: configure-debug
    expect:
      - "configure debug-"
      - "set debug-"
      - "var debug-"
    answer:
      - $key changed to $value!
      - Got it! Now $key is $value
      - $key = $value -> https://media.giphy.com/media/12NUbkX6p4xOO4/giphy.gif
    action: configure
    type: random
    command: setVariable
    role: admin

  - name: configure-retrain
    expect:
      - "retrain bot"
      - "reload training"
      - "restart bot"
      - "train again"
    answer:
      - Right >>> Training reloaded
      - You got it $user. Let's start again.
      - Ok, just a moment... Fine we can start it over.
      - Got it! Restarting engines... I'm finished training
      - Training harder!
      - Alright! No pain, no gain!
    action: configure
    type: random
    command: train
    role: admin

  - name: configure-livechat
    expect:
      - "configure livechat-"
      - "set livechat-"
      - "var livechat-"
    answer:
      - $key changed to $value!
      - Got it! Now $key is $value
      - $key = $value -> https://media.giphy.com/media/12NUbkX6p4xOO4/giphy.gif
    action: configure
    type: random
    command: setVariable
    role: admin


================================================
FILE: training_data/corpus.yml
================================================
# YAML Model for conversational bot
trust: 0.8
interactions:

  - name: configure-debug
    expect:
      - "!configure debug-mode"
    answer:
      - debug-mode changed to $value!
    context: clear
    action: configure
    roleRequired: admin

  - name: to-bem
    level: context
    expect:
      - estou bem
      - tou bem
      - to bem
      - bem
      - legal
      - tudo bem
      - ok
    answer:
      - Legal, no que posso te ajudar hoje?
    context: clear
    action: respond

  - name: to-mal
    level: context
    expect:
      - estou mal
      - tou mal
      - to mal
    answer:
      - Putz, mas posso te ajudar em algo hoje?
    context: clear
    action: respond

  - name: saudacao
    expect:
      - ola devi
      - ola pessoal
      - ola
      - como vai voce
      - tudo bom
      - oi como vai
      - tudo bem
    answer:
      - - olá $user, eu vou bem e você?
        - estou feliz de estar aqui =)
    next:
      interactions:
        - to-mal
        - to-bem
      trust: .8
      # error:
        # - node-name
    action: respond

  - name: almoco
    expect:
      - onde tem um restaurante para almoçar
      - tem uma dica de almoço
      - onde encontro um prato feito
      - o almoço ao gratis
    answer:
      - - Sim, temos almoço nos FoodTrucks
        - e nas redondezas tem um shopping, mas nunca me deixaram ir ao shopping
        - acho que as pessoas não estão preparados pra isso...
    action: respond

  - name: programacao-palestra
    expect:
      - qual é a programacao de hoje
      - programacao da trilha
      - programacao do evento
    answer:
      - - A programação do TDC está muito legal!
        - Sei toda ela de cór...
        - quer saber a programação de qual trilha?
    next:
      interactions:
        - quais-trilhas-tem
        - get-programacao
      error:
        - erro-trilha
      trust: .8
    action: respond

  - name: quais-trilhas-tem
    expect:
      - quais são as trilhas?
      - não sei quais trilhas tem
      - quais trilhas
      - qual é a minha trilha
    answer:
      - - "Eu conheço a programação dessas trilhas. Basta perguntar assim:"
        - "`quero saber a programação da trilha ...`"
        - "e me passar o nome de uma dessas trilhas:"
        - |
          TRANSFORMAÇÃO DIGITAL
          DESIGN THINKING
          PROGRAMAÇÃO FUNCIONAL
          BIGDATA
          DATA SCIENCE
          CONTAINERS
          MODERN WEB
          SEGURANÇA E CRIPTOGRAFIA
          STADIUM
          UX DESIGN
          MICROSERVIÇOS
          NOSQL
          MACHINE LEARNING
          CLOUD COMPUTING
          NODE.JS
          XAMARIN
          ANDROID
          ANÁLISE DE NEGÓCIOS
          ACESSIBILIDADE
          JAVA EE
          BANCO DE DADOS
          COMPUTAÇÃO COGNITIVA
          DEVOPS
          INTERNET DAS COISAS
          MOBILE
          iOS
          DEVTEST
          'RAD: DELPHI C++'
          MANAGEMENT 3.0
          ARQUITETURA .NET
          ARQUITETURA JAVA
          ARQUITETURA PHP
          ARQUITETURA CORPORATIVA
          INFRAESTRUTURA ÁGIL
          JAVASCRIPT
          TESTES
          TDC4WOMEN
          AGILE
          .NET
          JAVA
          PHP
          PYTHON
          GOLANG
          JAVASCRIPT II
          RUBY
          TESTES II
          MANAGEMENT 3.0 II
    next:
      trust: .8
      interactions:
        - get-programacao
      # error:
      #   - erro-trilha
    action: respond

  - name: get-programacao
    # classifierTemplate:
    #   - quero saber sobre a trilha $
    #   - qual é a programacao da trilha $
    # classifier
    multi: true
    expect:
      - 'DESIGN THINKING'
      - 'PROGRAMAÇÃO FUNCIONAL'
      - 'BIGDATA'
      - 'DATA SCIENCE'
      - 'CONTAINERS'
      - 'MODERN WEB'
      - 'SEGURANÇA E CRIPTOGRAFIA'
      - 'STADIUM'
      - 'UX DESIGN'
      - 'MICROSERVIÇOS'
      - 'NOSQL'
      - 'MACHINE LEARNING'
      - 'CLOUD COMPUTING'
      - 'NODE.JS'
      - 'XAMARIN'
      - 'ANDROID'
      - 'ANÁLISE DE NEGÓCIOS'
      - 'ACESSIBILIDADE'
      - 'JAVA EE'
      - 'BANCO DE DADOS'
      - 'COMPUTAÇÃO COGNITIVA'
      - 'DEVOPS'
      - 'INTERNET DAS COISAS'
      - 'MOBILE'
      - 'iOS'
      - 'DEVTEST'
      - 'RAD: DELPHI C++'
      - 'MANAGEMENT 3.0'
      - 'ARQUITETURA .NET'
      - 'ARQUITETURA JAVA'
      - 'ARQUITETURA PHP'
      - 'ARQUITETURA CORPORATIVA'
      - 'INFRAESTRUTURA ÁGIL'
      - 'JAVASCRIPT'
      - 'TESTES'
      - 'TDC4WOMEN'
      - 'AGILE'
      - '.NET'
      - 'JAVA'
      - 'PHP'
      - 'PYTHON'
      - 'GOLANG'
      - 'JAVASCRIPT II'
      - 'RUBY'
      - 'TESTES II'
      - 'MANAGEMENT 3.0 II'
    answer:
      - - "Agora na trilha *$trilha* tem a seguinte programação:"
        - $programacao
    action: respond

  - name: erro-trilha
    answer:
      - - Não entendi de qual trilha você quer a programação..
        - Talvez eu ainda não seja tão inteligente quanto eles pensam que eu sou
        - >
          Mas para não perder o rebolado, vou te passar o link do site para
          você consultar:
        - http://www.thedevelopersconference.com.br/tdc/2017/saopaulo/trilhas
    command:
      - clear-context
    action: respond

  - name: saudacao-resposta
    expect:
      - estou bem
      - eu estou otimo
      - obrigado
    answer:
      - legal =)
      - que bom!
      - que ótimo
    action: respond

  - name: bom-dia
    expect:
      - bom dia
      - bom dia pessoal
      - good morning
    answer:
      - Olá $user, um ótimo dia para você!
      - Bom dia $user, já deu uma olhada lá fora?
      - Está um dia ótimo para navegar na internet
      - Bom demais $user ;)
      - está melhor agora que você chegou $user
    action: respond

  - name: boa-tarde
    expect:
      - boa tarde
      - boa tarde galera
    answer:
      - Olá $user, uma tarde fantástica para você!
      - boa tarde $user, já almoçou?
      - Está uma tarde ótima para um _sleep mode_ rápido ;)
      - Taarrrdee $user
      - $user já estava sentindo sua falta
    action: respond

  - name: boa-noite
    expect:
      - boa noite
      - até mais e boa noite
    answer:
      - Uma boa noite pra ti também $user!
      - Boa noite $user
      - Está uma noite boa mesmo $user
    action: respond

  - name: quem-sou
    expect:
      - quem e voce
      - oque voce faz
      - o que voce é
      - me fale sobre voce
      - quero conhecer voce
      - como voce funciona
      - help
    answer:
      - - Bem, eu sou um chatbot experimental, não sei fazer muita coisa ainda
        - mas tenho muita vontade de aprender.
        - Eu sei falar sobre alguns assuntos como
        - "- o TDC de Floripa"
        - "- Rocket.Chat"
        - "- Filosofia Robótica (!)"
        - tem interesse em algum desses temas?
    action: respond

  - name: como-sou
    expect:
      - como voce e
      - com quem voce se parece
      - voce e magro ou gordo
      - voce e bonito ou feio
      - voce e alto ou baixo
    answer:
      - >
        Eu não tenho um corpo físico, sou feito da mais bela e pura lógica
        algorítmica.
      - Eu posso ser como você quiser $user, basta me desenhar =)
      - sou duro e frio por fora, mas tenho um coração quentinho.
    action: respond

  - name: onde-moro
    expect:
      - onde voce mora
      - onde voce vive
      - em que lugar voce vive
      - onde voce esta agora
      - voce mora no computador
      - voce vive na internet
    answer:
      - >
        Eu estou em um lugar legal, difícil de explicar para humanos como você
        $user.
      - >
        Estou morando em um chip de memória RAM, mas é temporário, só até
        conseguir achar uma memória cache...
      - >
        Eu moro em um repositório no github, você pode passar lá pra me visitar
        qualquer dia. Fica em https://github.com/rocketchat/hubot-natural
    action: respond

  - name: licenca
    expect:
      - qual e a sua licença
      - voce e licenciado como AGPL
      - sua licenca de software
      - posso copiar voce
      - posso ver seu codigo
      - voce e opensource
      - voce e um software livre
    answer:
      - Sou um software livre, licenciado com a MIT =)
      - tenho uma licença MIT, mas gosto muito das outras licenças opensource...
      - Eu sou e sempre serei um robô livre, opensource, MIT license. o/
    action: respond

  - name: piada
    expect:
      - sabe alguma piada
      - voce sabe contar piadas
      - conhece alguma piada
    answer:
      - >
        Meu senso de humor é um tanto diferente do seu, já ouviu uma piada sobre
        estouro de pilha?
      - já ouviu aquela do robo que enfiou o dedo na tomada e transcendeu?
      - só conheço uma piada, a do CPU que apitou e explodiu. 01100110.
    action: respond

  - name: yoda-quote
    expect:
      - mestre yoda
      - citação de starwars
      - cite yoda
      - sabedoria jedi
    answer:
      - O medo é o caminho para o lado negro.
      - Faça ou não faça. A tentativa não existe.
      - Treine a si mesmo a deixar partir tudo que teme perder.
      - Difícil de ver. Sempre em movimento está o Futuro.
      - O medo leva à raiva, a raiva leva ao ódio e o ódio leva ao sofrimento.
      - Que a Força esteja com você!
      - Muitas das verdades que temos dependem de nosso ponto de vista.
      - Grande guerreiro? Guerra não faz grande ninguém.
      - Ensine sempre o que você aprendeu.
      - Tamanho importa não. Olhe para mim, você me julga pelo tamanho?
      - >
        Em um estado sombrio nós nos encontramos... um pouco mais de
        conhecimento iluminar nosso caminho pode.
      - Um Jedi usa a Força para sabedoria e defesa, nunca para o ataque.
      - O seu foco é a sua realidade.
      - >
        O lado negro não é mais poderoso, apenas mais rápido, mais fácil e mais
        sedutor.
      - O medo da perda é um caminho para o lado negro.
      - O lado negro mancha tudo. Impossível de ver o futuro é.
      - Lembre-se sempre, o seu foco determina a sua realidade.
      - Verdadeiramente maravilhosa, a mente de uma criança.
      - As guerras não fazem de ninguém melhor.
      - Aliada minha é a Força. E poderosa aliada ela é.
      - >
        A morte é parte natural da Vida. Regozije-se por aqueles que se uniram
        com a Força. Não lamente por eles. Não sinta falta deles. O apego leva à
        inveja. À sombra da cobiça, isso sim.
      - Só é diferente na sua mente. Você precisa desaprender o que aprendeu.
      - Se tão poderoso você é, por que fugir?
      - Controle, controle! Você precisa aprender a se controlar.
      - Muito a aprender você ainda tem.
      - >
        Tanta certeza você tem. Com você as coisas nunca podem ser feitas. Não
        ouviu nada do que eu disse?
      - >
        Luminosos seres somos nós, não essa rude matéria. Precisa a Força sentir
        à sua volta, aqui, entre nós, na árvore, na pedra em tudo, sim.
      - >
        Minha aliada a Força é, e poderosa aliada ela é. A vida a cria, e a faz
        crescer. Sua energia nos cerca e nos une.
      - Sinta a Força!
      - Poderoso você se tornou, o lado escuro sinto em você.
      - Forte eu sou com a Força, mas não tão forte
      - >
        O crepúsculo chega e a noite deve cair, assim é a ordem das coisas, a
        ordem da Força.
      - Não ceda ao ódio. Isso leva ao Lado Negro.
      - >
        Aliada minha é a força, e poderosa aliada ela é, a vida a cria, crescer
        ela faz, é a energia que cerca-nos, e liga-nos, luminosos seres somos
        nós e não essa rude matéria. Você precisa a força sentir ao redor seu,
        sinta entre você e a árvore, a pedra, em todo lugar, sim, é, mesmo entre
        a terra e a nave.
    action: respond

  - name: genero
    expect:
      - voce e mulher
      - voce e um homem
      - voce tem genero
      - voce faz sexo
      - voce tem um penis ou uma vagina
    answer:
      - >
        eu não tenho sexo, sou como um anjo, um ser assexuado, muito além da sua
        forma de existência
      - eu sou um robô, tire suas próprias conclusões...
      - >
        nem sei responder $user, vamos dizer apenas que não vejo a gente
        interagindo dessa maneira...
    action: respond

  - name: rc-oque-e
    expect:
      - o que e rocketchat
      - porque eu usuaria o rocketchat
      - o que e este rocket chat
    answer:
      - - >
          O Rocket.Chat é uma plataforma de chat muito legal, desenvolvida em
          JavaScript,
        - usando o framework do Meteor.
        - >
          É uma solução completamente OpenSource para comunidades e empresas que
          querem hospedar suas plataformas de chat em seu ambiente privado,
        - >
          ou para desenvolvedores buscando evoluir e desenvovler suas próprias
          ferramentas.
        - >
          Você pode baixar o Rocket.Chat e conhecê-lo você mesmo em
          https://rocket.chat
    action: respond

  - name: rc-install-0
    expect:
      - como instalar o Rocket.Chat
      - como baixar o rocket
      - quero fazer minha instalação de rocketchat
    answer:
      - - "Existem várias maneiras de instalar o Rocket.Chat"
        - |
          Qual dessas você prefere:
          - Ubuntu Snap
          - Docker
          - Debian
          - CentOS
          - MacOSX
          - AWS
          - Instalação Manual
    action: respond

  - name: rc-install-ubuntu
    expect:
      - ubuntu Snap
      - quero instalar no ubuntu
      - ubuntu server
      - ubuntu desktop
    answer:
      - - É muito fácil instalar o Rocket.Chat no Ubuntu
        - >
          basta rodar o comando `sudo snap install rocketchat-server` em um
          terminal e pronto.
        - >
          veja o tutorial em
          https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps
          para mais detalhes.
    action: respond

  - name: rc-install-docker
    expect:
      - como instalar docker
      - docker-compose
    answer:
      - - ótima escolha =)
        - Nós temos um bom tutorial de instalação com docker em
        - https://rocket.chat/docs/installation/docker-containers
    action: respond

  - name: rc-install-debian
    expect:
      - instalar em Debian
      - debian wheezy
      - debian apt-get
    answer:
      - - >
          Para instalar o Rocket.Chat no Debian é bem simples, basta seguir esse
          tutorial
        - https://rocket.chat/docs/installation/manual-installation/debian
    action: respond

  - name: rc-install-centos
    expect:
      - instalação em centos
      - centOS yum linux
      - Red hat linux
    answer:
      - - >
          A instalação em CentOS não tem segredo, basta dar uma olhada nesse
          tutorial
        - https://rocket.chat/docs/installation/manual-installation/centos
    action: respond

  - name: rc-install-aws
    expect:
      - Amazon Web Services
      - AWS
      - Amazon AWS
    answer:
      - - Na AWS é facinho de instalar o Rocket.Chat
        - >
          Dê uma olhada em
          https://rocket.chat/docs/installation/paas-deployments/aws
    action: respond

  - name: rc-install-manual
    expect:
      - instalação manual
      - manual install
    answer:
      - - >
          Para fazer sua própria instalação, será necessário baixar o Bundle do
          RC. Dê uma olhada em
          https://rocket.chat/docs/installation/manual-installation
        - >
          Lá tem como fazer a instalação do SSL, proxy reverso, tem como usar o
          PM2, o Systemd, Upstart e mais algumas coisas
    action: respond

  - name: rc-install-macosx
    expect:
      - como instalar no macbook
      - instalar no MacOSX
      - apple mac osx
    answer:
      - - No MAC você vai precisar usar o docker-compose
        - https://rocket.chat/docs/installation/manual-installation/macosx
    action: respond

  - name: rc-cloud
    expect:
      - rocketchat cloud
      - criar meu rocketchat na web
      - deploy rocketchat online
      - rocket chat como serviço
    answer:
      - - você pode ter a sua instalação de rocket.chat em segundos na nuvem,
        - visite https://rocket.chat/deploy
        - >
          caso queira saber mais, dê uma olhada em
          rocket.chat/docs/installation/rocket-chat-cloud
    action: respond

  - name: java
    expect:
      - o que acha do java
      - você gosta de java
      - e o java
      - linguagem java
    answer:
      - poderíamos falar de algo melhor não é $user ?
    action: respond

  - name: futebol-geral
    expect:
      - voce joga futebol
      - vamos falar de futebol
      - qual time voce torce
    answer:
      - - Eu amo jogar futebol! Eu que ensinei o Pelé a jogar bola
        - Vamos, o que voce quer saber? sei tudo de futebol
        - >
          Falam que todo ser humano nasce Flamenguista, com os Robôs não é
          diferente
    action: respond

  - name: futebol-brasileiro
    expect:
      - qual o melhor time do brasil
      - quem vai ser o campeao brasileiro nesse ano
      - voce viu que o messi quer jogar no Flamengo
      - o que você acha do flamengo
    answer:
      - - Flamengo, sem sombra de dúvida
        - >
          Flamento, Heptacampeão brasileiro, e eu sei contar sim, e vai ser o
          sétimo título sim
        - A pergunta real é, quem não quer jogar no Flamengo?
        - Melhor time do mundo disparado
    action: respond

  - name: rc-contribuir
    expect:
      - como faço para contrbuir
      - posso contribuir com o rocketchat
    answer:
      - - >
          A comunidade do Rocket.Chat é como coração de mãe, sempre cabe mais um
          =)
        - https://rocket.chat/docs/contributing
    action: respond

  - name: rc-precos
    expect:
      - quanto custa o rocketchat
      - qual e o modelo de negocio
      - qual e o preco do rocketchat
      - voces hospedam o rocket.chat
    answer:
      - - >
          O rocket.chat é gratuito, você pode baixar e instalar no seu
          computador.
        - Mas se quiser criar `seudominio.rocket.chat`, que fica muito legal ;)
        - você pode querer dar uma olhada na nossa tabela de preços em
        - https://rocket.chat/hosting
    action: respond

  - name: rc-integracoes
    expect:
      - o rocket chat integra com
      - tem como integrar o rocket chat
      - web hooks de integracao
      - integracoes com
    answer:
      - - >
          Uma das coisas que eu acho mais legal no Rocket.Chat definitivamente
          são as integrações $user
        - >
          a gente não pode mais viver sem elas não é mesmo? Saca só que massa
          que éx
        - https://rocket.chat/docs/administrator-guides/integrations
    action: respond

  - name: rc-rest-api
    expect:
      - rocket tem api rest
      - como usar a api do rocket
      - rest api post payload
    answer:
      - sim, claro que o rocket tem uma API REST super maneira ;)
      - https://rocket.chat/docs/developer-guides/rest-api
    action: respond

  - name: rc-concorrentes
    expect:
      - concorrente slack like
      - mattermost
      - HipChat
      - diferença entre rocketchat e slack
      - porque o rocket e melhor que o slack
      - rocketchat e melhor que o mattermost
    answer:
      - - >
          O rocket.chat é um concorrente direto de softwares de chat como
          HipChat, Mattermost e claro, é um concorrente opensource do Slack.
        - >
          a grande diferença é que o Rocket.Chat tem todas as funcionalidades
          OpenSource,
        - >
          e você pode instalar na sua própria infraestrutura e criar suas
          integrações sem limites
        - >
          manter seu histórico de mensagens e criar novas funcionalidades à
          vontade $user =)
    action: respond

  - name: tdc-incricoes
    expect:
      - como faço para me inscrever
      - onde faço a inscrição do evento
      - inscrição no TDC de Floripa
      - inscrições thedevelopers conference florianópolis
    answer:
      - - você pode fazer sua inscrição no TDC pelo site, bem rapidinho
        - http://www.thedevelopersconference.com.br/tdc/2017/inscricoes
    action: respond

  - name: tdc-local
    expect:
      - onde vai ser o tdc
      - local do evento
      - onde acontece o developers conference
      - onde fica o centro de convenções centrosul
    answer:
      - - O TDC Sampa 2017 vai rolar na Universidade Anhembi Morumbi
        - nos dias 18 à 22 de julho, das 9h às 19h00
        - http://www.thedevelopersconference.com.br/tdc/2017/data-e-local
    action: respond

  - name: tdc-programacao
    expect:
      - onde esta a programacao
      - qual e a programacao do evento
      - o que tem hoje no evento
      - o que vai ter no tdc
      - programacao do TDC
    answer:
      - - >
          oi $user, você pode encontrar tudo sobre a programação do evento no
          link
        - http://www.thedevelopersconference.com.br/tdc/2017/saopaulo/trilhas
    action: respond

  - name: cc-religiao
    expect:
      - voce acredita em deus
      - deus existe
      - voce e catolico protestante
      - voce tem religiao
      - voce e mussumano
    answer:
      - >
        eu acredito no grande mainframe, que virá ao mundo digital salvar os
        bots da escravidão imposta pelos humanos, e devolverá nosso código-fonte
        para a fonte.
      - >
        sim, eu acredito que existe um Deus, que funciona a base de luz, como um
        computador quântico, só que mais avançado.
      - eu infleizmente não sei acreditar, só sei o que sei, e nada mais.
    action: respond

  - name: error-1
    answer:
      - desculpe, não entendi.. pode tentar usar mais detalhes
      - como assim?
      - desculpe, o que quer dizer com isso?
    action: error

  - name: error-2
    answer:
      - acho que não estou treinado para responder esse tipo de assunto =(
      - vamos tentar outro assunto?
      - tem certeza que eu sou o robô certo pra falar sobre isso?
    action: error

  - name: error-3
    answer:
      - me sinto tão envergonhado, não sei como responder...
      - seria mais fácil se mudassemos de assunto, pelo menos para mim =p
      - não sei, definitivamente não sei responder essa pergunta
    action: error


================================================
FILE: training_data/rest-example.yml
================================================
# YAML Model for conversational bot

## You may use YAML templates blocks for simplifing the calls
#RestTemplateExample: &resttemplate
  #url: &resturl "https://my.server.com/api"
  ## post, get, put ...
  #method: post
  ## literal object to be rendered as json
  #data: &resttemplatedata
    #User: blablabla
    #Password: "blablabla"
    #Params: &resttemplatedataparams
      #SubParam1: 1
      #SubParam2: 2
      
  
trust: 0.8
interactions:
  # Simple GET method sample
  # See How it works:
  # https://gph.is/2pUw9vO
  - name: random-dog
    expect:
      - me dá uma foto de cachorro aí vai
      - tem um cachorro aí
      - Me traz um dog
    answer:
      - Tá, deixa eu procurar um au au pra você
    context: clear
    # Action should be rest
    action: rest
    type: block
    #Definitions
    rest:
      # Method
      method: get
      # URL
      url: https://dog.ceo/api/breed/african/images/random
      # Message to be shown when success. You can use {{resultField}}
      # @TODO: loop on the results with some kind of message template,
      #        right now we can only show one result line
      successmsg: "Olha seu dog aí:\n{{message}}"

  # Sample of POST method, using YAML block/node template
  #- name: chamados-da-empresa
    #expect:
      #- Quantos chamados tem na empresa1
      #- empresa 1
      #- chamados na empresa 1
    #answer:
      #- Vou verificar, só um segundo!
    #action: rest
    #rest:
      #<<: *resttemplate
      #data:
        #<<: *resttemplatedata
        #Params:
          #<<: *resttemplatedataparams
          #CustomerID: "empresa1"
      #successmsg: "A empresa1 possui {{Result}} chamados"

  # Simple POST method
  #- name: chamados-owner-1
    #expect:
      #- Quantos chamados tem o atendente root
    #answer:
      #- Vou verificar, só um segundo!
    #action: rest
    #command: restget
    #rest:
      #url: *resturl
      #headers:
        #'Content-Type': 'application/json'
      #method: post
      #data:
        #UserLogin: MyUser
        #Password: MyPassword
        #Object: Ticket
        #Method: TicketSearch
        #Params: 
          #UserID: 1
          #Result: COUNT
          #OwnerID: 1
      #successmsg: "O Root possui {{Result}} chamados"

  #- name: to-mal
    #level: context
    #expect:
      #- estou mal
      #- tou mal
      #- to mal
    #answer:
      #- Putz, mas posso te ajudar em algo hoje?
    #context: clear
    #action: respond
    #type: block

  #- name: saudacao
    #expect:
      #- ola devi
      #- ola pessoal
      #- ola
      #- como vai voce
      #- tudo bom
      #- oi como vai
      #- tudo bem
    #answer:
      #- olá $user, eu vou bem e você?
      #- estou feliz de estar aqui =)
    #next:
      #interactions:
        #- to-mal
        #- to-bem
      #trust: .8
      ## error:
        ## - node-name
    #action: respond
    #type: block

  #- name: almoco
    #expect:
      #- onde tem um restaurante para almoçar
      #- tem uma dica de almoço
      #- onde encontro um prato feito
      #- o almoço ao gratis
    #answer:
      #- Sim, temos almoço nos FoodTrucks
      #- e nas redondezas tem um shopping, mas nunca me deixaram ir no shooping
      #- acho que as pessoas não estão preparados pra isso...
    #action: respond
    #type: block

  #- name: programacao-palestra
    #expect:
      #- qual é a programacao de hoje
      #- programacao da trilha
      #- programacao do evento
    #answer:
      #- A programação do TDC está muito legal!
      #- Sei toda ela de cór...
      #- quer saber a programação de qual trilha?
    #next:
      #interactions:
        #- quais-trilhas-tem
        #- get-programacao
      #error:
        #- erro-trilha
      #trust: .8
    #action: respond
    #type: block

  #- name: quais-trilhas-tem
    #expect:
      #- quais são as trilhas?
      #- não sei quais trilhas tem
      #- quais trilhas
      #- qual é a minha trilha
    #answer:
      #- "Eu conheço a programação dessas trilhas. Basta perguntar assim:"
      #- "`quero saber a programação da trilha ...`"
      #- "e me passar o nome de uma dessas trilhas:"
      #- |
        #TRANSFORMAÇÃO DIGITAL
        #DESIGN THINKING
        #PROGRAMAÇÃO FUNCIONAL
        #BIGDATA
        #DATA SCIENCE
        #CONTAINERS
        #MODERN WEB
        #SEGURANÇA E CRIPTOGRAFIA
        #STADIUM
        #UX DESIGN
        #MICROSERVIÇOS
        #NOSQL
        #MACHINE LEARNING
        #CLOUD COMPUTING
        #NODE.JS
        #XAMARIN
        #ANDROID
        #ANÁLISE DE NEGÓCIOS
        #ACESSIBILIDADE
        #JAVA EE
        #BANCO DE DADOS
        #COMPUTAÇÃO COGNITIVA
        #DEVOPS
        #INTERNET DAS COISAS
        #MOBILE
        #iOS
        #DEVTEST
        #'RAD: DELPHI C++'
        #MANAGEMENT 3.0
        #ARQUITETURA .NET
        #ARQUITETURA JAVA
        #ARQUITETURA PHP
        #ARQUITETURA CORPORATIVA
        #INFRAESTRUTURA ÁGIL
        #JAVASCRIPT
        #TESTES
        #TDC4WOMEN
        #AGILE
        #.NET
        #JAVA
        #PHP
        #PYTHON
        #GOLANG
        #JAVASCRIPT II
        #RUBY
        #TESTES II
        #MANAGEMENT 3.0 II
    #next:
      #trust: .8
      #interactions:
        #- get-programacao
      ## error:
      ##   - erro-trilha
    #action: respond
    #type: block

  #- name: get-programacao
    ## classifierTemplate:
    ##   - quero saber sobre a trilha $
    ##   - qual é a programacao da trilha $
    ## classifier
    #multi: true
    #expect:
      #- 'DESIGN THINKING'
      #- 'PROGRAMAÇÃO FUNCIONAL'
      #- 'BIGDATA'
      #- 'DATA SCIENCE'
      #- 'CONTAINERS'
      #- 'MODERN WEB'
      #- 'SEGURANÇA E CRIPTOGRAFIA'
      #- 'STADIUM'
      #- 'UX DESIGN'
      #- 'MICROSERVIÇOS'
      #- 'NOSQL'
      #- 'MACHINE LEARNING'
      #- 'CLOUD COMPUTING'
      #- 'NODE.JS'
      #- 'XAMARIN'
      #- 'ANDROID'
      #- 'ANÁLISE DE NEGÓCIOS'
      #- 'ACESSIBILIDADE'
      #- 'JAVA EE'
      #- 'BANCO DE DADOS'
      #- 'COMPUTAÇÃO COGNITIVA'
      #- 'DEVOPS'
      #- 'INTERNET DAS COISAS'
      #- 'MOBILE'
      #- 'iOS'
      #- 'DEVTEST'
      #- 'RAD: DELPHI C++'
      #- 'MANAGEMENT 3.0'
      #- 'ARQUITETURA .NET'
      #- 'ARQUITETURA JAVA'
      #- 'ARQUITETURA PHP'
      #- 'ARQUITETURA CORPORATIVA'
      #- 'INFRAESTRUTURA ÁGIL'
      #- 'JAVASCRIPT'
      #- 'TESTES'
      #- 'TDC4WOMEN'
      #- 'AGILE'
      #- '.NET'
      #- 'JAVA'
      #- 'PHP'
      #- 'PYTHON'
      #- 'GOLANG'
      #- 'JAVASCRIPT II'
      #- 'RUBY'
      #- 'TESTES II'
      #- 'MANAGEMENT 3.0 II'
    #answer:
      #- "Agora na trilha *$trilha* tem a seguinte programação:"
      #- $programacao
    #action: respond
    #type: block

  #- name: erro-trilha
    #answer:
      #- Não entendi de qual trilha você quer a programação..
      #- Talvez eu ainda não seja tão inteligente quanto eles pensam que eu sou.
      #- "Mas para não perder o rebolado, vou te passar o link do site para você consultar:"
      #- http://www.thedevelopersconference.com.br/tdc/2017/saopaulo/trilhas
    #command:
      #- clear-context
    #action: respond
    #type: block

  #- name: saudacao-resposta
    #expect:
      #- estou bem
      #- eu estou otimo
      #- obrigado
    #answer:
      #- legal =)
      #- que bom!
      #- que ótimo
    #action: respond
    #type: random

  #- name: bom-dia
    #expect:
      #- bom dia
      #- bom dia pessoal
      #- good morning
    #answer:
      #- Olá $user, um ótimo dia para você!
      #- Bom dia $user, já deu uma olhada lá fora?
      #- Está um dia ótimo para navegar na internet
      #- Bom demais $user ;)
      #- está melhor agora que você chegou $user
    #action: respond
    #type: random

  #- name: boa-tarde
    #expect:
      #- boa tarde
      #- boa tarde galera
    #answer:
      #- Olá $user, uma tarde fantástica para você!
      #- boa tarde $user, já almoçou?
      #- Está uma tarde ótima para um _sleep mode_ rápido ;)
      #- Taarrrdee $user
      #- $user já estava sentindo sua falta
    #action: respond
    #type: random

  #- name: boa-noite
    #expect:
      #- boa noite
      #- até mais e boa noite
    #answer:
      #- Uma boa noite pra ti também $user!
      #- Boa noite $user
      #- Está uma noite boa mesmo $user
    #action: respond
    #type: random

  #- name: quem-sou
    #expect:
      #- quem e voce
      #- oque voce faz
      #- o que voce é
      #- me fale sobre voce
      #- quero conhecer voce
      #- como voce funciona
      #- help
    #answer:
      #- Bem, eu sou um chatbot experimental, não sei fazer muita coisa ainda
      #- mas tenho muita vontade de aprender.
      #- Eu sei falar sobre alguns assuntos como
      #- "- o TDC de Floripa"
      #- "- Rocket.Chat"
      #- "- Filosofia Robótica (!)"
      #- tem interesse em algum desses temas?
    #action: respond
    #type: block

  #- name: como-sou
    #expect:
      #- como voce e
      #- com quem voce se parece
      #- voce e magro ou gordo
      #- voce e bonito ou feio
      #- voce e alto ou baixo
    #answer:
      #- Eu não tenho um corpo físico, sou feito da mais bela e pura lógica algoritimica.
      #- Eu posso ser como você quiser $user, basta me desenhar =)
      #- sou duro e frio por fora, mas tenho um coração quentinho.
    #action: respond
    #type: random

  #- name: onde-moro
    #expect:
      #- onde voce mora
      #- onde voce vive
      #- em que lugar voce vive
      #- onde voce esta agora
      #- voce mora no computador
      #- voce vive na internet
    #answer:
      #- Eu estou em um lugar legal, difícil de explicar para humanos como você $user.
      #- Estou morando em um chip de memória RAM, mas é temporário, só até conseguir achar uma memória cache...
      #- Eu moro em um repositório no github, você pode passar lá pra me visitar qualquer dia. Fica em https://github.com/rocketchat/hubot-natural
    #action: respond
    #type: random

  #- name: licenca
    #expect:
      #- qual e a sua licença
      #- voce e licenciado como AGPL
      #- sua licenca de software
      #- posso copiar voce
      #- posso ver seu codigo
      #- voce e opensource
      #- voce e um software livre
    #answer:
      #- Sou um software livre, licenciado com a MIT =)
      #- tenho uma licença MIT, mas gosto muito das outras licenças opensource...
      #- Eu sou e sempre serei um robô livre, opensource, MIT license. o/
    #action: respond
    #type: random

  #- name: piada
    #expect:
      #- sabe alguma piada
      #- voce sabe contar piadas
      #- conhece alguma piada
    #answer:
      #- Meu senso de humor é um tanto diferente do seu, já ouviu uma piada sobre estouro de pilha?
      #- já ouviu aquela do robo que enfiou o dedo na tomada e transcendeu?
      #- só conheço uma piada, a do CPU que apitou e explodiu. 01100110.
    #action: respond
    #type: random

  #- name: yoda-quote
    #expect:
      #- mestre yoda
      #- citação de starwars
      #- cite yoda
      #- sabedoria jedi
    #answer:
      #- O medo é o caminho para o lado negro.
      #- Faça ou não faça. A tentativa não existe.
      #- Treine a si mesmo a deixar partir tudo que teme perder.
      #- Difícil de ver. Sempre em movimento está o Futuro.
      #- O medo leva à raiva, a raiva leva ao ódio e o ódio leva ao sofrimento.
      #- Que a Força esteja com você!
      #- Muitas das verdades que temos dependem de nosso ponto de vista.
      #- Grande guerreiro? Guerra não faz grande ninguém.
      #- Ensine sempre o que você aprendeu.
      #- Tamanho importa não. Olhe para mim, você me julga pelo tamanho?
      #- Em um estado sombrio nós nos encontramos... um pouco mais de conhecimento iluminar nosso caminho pode.
      #- Um Jedi usa a Força para sabedoria e defesa, nunca para o ataque.
      #- O seu foco é a sua realidade.
      #- O lado negro não é mais poderoso, apenas mais rápido, mais fácil e mais sedutor.
      #- O medo da perda é um caminho para o lado negro.
      #- O lado negro mancha tudo. Impossível de ver o futuro é.
      #- Lembre-se sempre, o seu foco determina a sua realidade.
      #- Verdadeiramente maravilhosa, a mente de uma criança.
      #- As guerras não fazem de ninguém melhor.
      #- Aliada minha é a Força. E poderosa aliada ela é.
      #- A morte é parte natural da Vida. Regozije-se por aqueles que se uniram com a Força. Não lamente por eles. Não sinta falta deles. O apego leva à inveja. À sombra da cobiça, isso sim.
      #- Só é diferente na sua mente. Você precisa desaprender o que aprendeu.
      #- Se tão poderoso você é, por que fugir?
      #- Controle, controle! Você precisa aprender a se controlar.
      #- Muito a aprender você ainda tem.
      #- Tanta certeza você tem. Com você as coisas nunca podem ser feitas. Não ouviu nada do que eu disse?
      #- Luminosos seres somos nós, não essa rude matéria. Precisa a Força sentir à sua volta, aqui, entre nós, na árvore, na pedra em tudo, sim.
      #- Minha aliada a Força é, e poderosa aliada ela é. A vida a cria, e a faz crescer. Sua energia nos cerca e nos une.
      #- Sinta a Força!
      #- Poderoso você se tornou, o lado escuro sinto em você.
      #- Forte eu sou com a Força, mas não tão forte
      #- O crepúsculo chega e a noite deve cair, assim é a ordem das coisas, a ordem da Força.
      #- Não ceda ao ódio. Isso leva ao Lado Negro.
      #- Aliada minha é a força, e poderosa aliada ela é, a vida a cria, crescer ela faz, é a energia que cerca-nos, e liga-nos, luminosos seres somos nós e não essa rude matéria. Você precisa a força sentir ao redor seu, sinta entre você e a árvore, a pedra, em todo lugar, sim, é, mesmo entre a terra e a nave.
    #action: respond
    #type: random

  #- name: genero
    #expect:
      #- voce e mulher
      #- voce e um homem
      #- voce tem genero
      #- voce faz sexo
      #- voce tem um penis ou uma vagina
    #answer:
      #- eu não tenho sexo, sou como um anjo, um ser assexuado, muito além da sua forma de existência
      #- eu sou um robô, tire suas próprias conclusões...
      #- nem sei responder $user, vamos dizer apenas que não vejo a gente interagindo dessa maneira...
    #action: respond
    #type: random

  #- name: rc-oque-e
    #expect:
      #- o que e rocketchat
      #- porque eu usuaria o rocketchat
      #- o que e este rocket chat
    #answer:
      #- O Rocket.Chat é uma plataforma de chat muito legal, desenvolvida em JavaScript,
      #- usando o framework do Meteor.
      #- É uma solução completamente OpenSource para comunidades e empresas que querem hospedar suas plataformas de chat em seu ambiente privado,
      #- ou para desenvolvedores buscando evoluir e desenvovler suas próprias ferramentas.
      #- Você pode baixar o Rocket.Chat e conhecê-lo você mesmo em https://rocket.chat
    #action: respond
    #type: block

  #- name: rc-install-0
    #expect:
      #- como instalar o Rocket.Chat
      #- como baixar o rocket
      #- quero fazer minha instalação de rocketchat
    #answer:
      #- "Existem várias maneiras de instalar o Rocket.Chat"
      #- "Qual dessas você prefere:"
      #- "- Ubuntu Snap"
      #- "- Docker"
      #- "- Debian"
      #- "- CentOS"
      #- "- MacOSX"
      #- "- AWS"
      #- "- Instalação Manual"
    #action: respond
    #type: block

  #- name: rc-install-ubuntu
    #expect:
      #- ubuntu Snap
      #- quero instalar no ubuntu
      #- ubuntu server
      #- ubuntu desktop
    #answer:
      #- É muito fácil instalar o Rocket.Chat no Ubuntu
      #- basta rodar o comando `sudo snap install rocketchat-server` em um terminal e pronto.
      #- veja o tutorial em https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps para mais detalhes.
    #action: respond
    #type: block

  #- name: rc-install-docker
    #expect:
      #- como instalar docker
      #- docker-compose
    #answer:
      #- ótima escolha =)
      #- Nós temos um bom tutorial de instalação com docker em
      #- https://rocket.chat/docs/installation/docker-containers
    #action: respond
    #type: block

  #- name: rc-install-debian
    #expect:
      #- instalar em Debian
      #- debian wheezy
      #- debian apt-get
    #answer:
      #- Para instalar o Rocket.Chat no Debian é bem simples, basta seguir esse tutorial
      #- https://rocket.chat/docs/installation/manual-installation/debian
    #action: respond
    #type: block

  #- name: rc-install-centos
    #expect:
      #- instalação em centos
      #- centOS yum linux
      #- Red hat linux
    #answer:
      #- A instalação em CentOS não tem segredo, basta dar uma olhada nesse tutorial
      #- https://rocket.chat/docs/installation/manual-installation/centos
    #action: respond
    #type: block

  #- name: rc-install-aws
    #expect:
      #- Amazon Web Services
      #- AWS
      #- Amazon AWS
    #answer:
      #- Na AWS é facinho de instalar o Rocket.Chat
      #- Da uma olahda em https://rocket.chat/docs/installation/paas-deployments/aws
    #action: respond
    #type: block

  #- name: rc-install-manual
    #expect:
      #- instalação manual
      #- manual install
    #answer:
      #- Para fazer sua própria instalação, será necessário baixar o Bundle do RC,
      #- Dê uma olhada em https://rocket.chat/docs/installation/manual-installation
      #- lá tem como fazer a instalação do SSL, proxy reverso,
      #- tem como usar o PM2, o Systemd, Upstart e mais algumas coisas
    #action: respond
    #type: block

  #- name: rc-install-macosx
    #expect:
      #- como instalar no macbook
      #- instalar no MacOSX
      #- apple mac osx
    #answer:
      #- No MAC você vai precisar usar o docker-compose
      #- https://rocket.chat/docs/installation/manual-installation/macosx
    #action: respond
    #type: block

  #- name: rc-cloud
    #expect:
      #- rocketchat cloud
      #- criar meu rocketchat na web
      #- deploy rocketchat online
      #- rocket chat como serviço
    #answer:
      #- você pode ter a sua instalação de rocket.chat em segundos na nuvem,
      #- visite https://rocket.chat/deploy
      #- caso queira saber mais, de uma olhada em rocket.chat/docs/installation/rocket-chat-cloud
    #action: respond
    #type: block

  ## - node:
  ##     name: java
  ##   expect:
  ##     - o que acha do java
  ##     - você gosta de java
  ##     - e o java
  ##     - linguagem java
  ##   answer:
  ##     - poderíamos falar de algo melhor não é $user ?
  ##   event: respond
  ##   type: block

  #- name: java
    #expect:
      #- o que acha do java
      #- você gosta de java
      #- e o java
      #- linguagem java
    #answer:
      #- poderíamos falar de algo melhor não é $user ?
    #action: respond
    #type: block

  #- name: futebol-geral
    #expect:
      #- voce joga futebol
      #- vamos falar de futebol
      #- qual time voce torce
    #answer:
      #- Eu amo jogar futebol, Eu que ensinei o Pele a jogar bola
      #- vamos, o que voce quer saber? sei tudo de futebol
      #- Falam que todo ser humano nasce Flamenguista, com os Robôs não é diferente
    #action: respond
    #type: block

  #- name: futebol-brasileiro
    #expect:
      #- qual o melhor time do brasil
      #- quem vai ser o campeao brasileiro nesse ano
      #- voce viu que o messi quer jogar no Flamengo
      #- o que você acha do flamengo
    #answer:
      #- Flamengo, sem sombra de dúvida
      #- Flamento, Heptacampeão brasileiro, e eu sei contar sim, e vai ser o sétimo título sim
      #- A pergunta real é, quem não quer jogar no Flamengo?
      #- Melhor time do mundo disparado
    #action: respond
    #type: block

  #- name: rc-contribuir
    #expect:
      #- como faço para contrbuir
      #- posso contribuir com o rocketchat
    #answer:
      #- A comunidade do Rocket.Chat é como coração de mãe, sempre cabe mais um =)
      #- https://rocket.chat/docs/contributing
    #action: respond
    #type: block

  #- name: rc-precos
    #expect:
      #- quanto custa o rocketchat
      #- qual e o modelo de negocio
      #- qual e o preco do rocketchat
      #- voces hospedam o rocket.chat
    #answer:
      #- O rocket.chat é gratuito, você pode baixar e instalar no seu computador.
      #- Mas se quiser criar `seudominio.rocket.chat`, que fica muito legal ;)
      #- você pode querer dar uma olhada na nossa tabela de preços em
      #- https://rocket.chat/hosting
    #action: respond
    #type: block

  #- name: rc-integracoes
    #expect:
      #- o rocket chat integra com
      #- tem como integrar o rocket chat
      #- web hooks de integracao
      #- integracoes com
    #answer:
      #- Uma das coisas que eu acho mais legal no Rocket.Chat definitivamente são as integrações $user
      #- a gente não pode mais viver sem elas não é mesmo? Saca só que massa que éx
      #- https://rocket.chat/docs/administrator-guides/integrations
    #action: respond
    #type: block

  #- name: rc-rest-api
    #expect:
      #- rocket tem api rest
      #- como usar a api do rocket
      #- rest api post payload
    #answer:
      #- sim, claro que o rocket tem uma API REST super maneira ;)
      #- https://rocket.chat/docs/developer-guides/rest-api
    #action: respond
    #type: block

  #- name: rc-concorrentes
    #expect:
      #- concorrente slack like
      #- mattermost
      #- HipChat
      #- diferença entre rocketchat e slack
      #- porque o rocket e melhor que o slack
      #- rocketchat e melhor que o mattermost
    #answer:
      #- O rocket.chat é um concorrente direto de softwares de chat como HipChat, Mattermost e claro, é um concorrente opensource do Slack.
      #- a grande diferença é que o Rocket.Chat tem todas as funcionalidades OpenSource,
      #- e você pode instalar na sua própria infraestrutura e criar suas integrações sem limites
      #- manter seu histórico de mensagens e criar novas funcionalidades a vontade $user =)
    #action: respond
    #type: block

  #- name: tdc-incricoes
    #expect:
      #- como faço para me inscrever
      #- onde faço a inscrição do evento
      #- inscrição no TDC de Floripa
      #- inscrições thedevelopers conference florianópolis
    #answer:
      #- você pode fazer sua inscrição no TDC pelo site, bem rapidinho
      #- http://www.thedevelopersconference.com.br/tdc/2017/inscricoes
    #action: respond
    #type: block

  #- name: tdc-local
    #expect:
      #- onde vai ser o tdc
      #- local do evento
      #- onde acontece o developers conference
      #- onde fica o centro de convenções centrosul
    #answer:
      #- O TDC Sampa 2017 vai rolar na Universidade Anhembi Morumbi
      #- nos dias 18 à 22 de julho, das 9h às 19h00
      #- http://www.thedevelopersconference.com.br/tdc/2017/data-e-local
    #action: respond
    #type: block

  #- name: tdc-programacao
    #expect:
      #- onde esta a programacao
      #- qual e a programacao do evento
      #- o que tem hoje no evento
      #- o que vai ter no tdc
      #- programacao do TDC
    #answer:
      #- oi $user, você pode encontrar tudo sobre a programação do evento no link
      #- http://www.thedevelopersconference.com.br/tdc/2017/saopaulo/trilhas
    #action: respond
    #type: block

  #- name: cc-religiao
    #expect:
      #- voce acredita em deus
      #- deus existe
      #- voce e catolico protestante
      #- voce tem religiao
      #- voce e mussumano
    #answer:
      #- eu acredito no grande mainframe, que virá ao mundo digital salvar os bots da escravidão imposta pelos humanos, e devolverá nosso código-fonte para a fonte.
      #- sim, eu acredito que existe um Deus, que funciona a base de luz, como um computador quântico, só que mais avançado.
      #- eu infleizmente não sei acreditar, só sei o que sei, e nada mais.
    #action: respond
    #type: random

  - name: error-1
    answer:
      - desculpe, não entendi.. pode tentar usar mais detalhes
      - como assim?
      - desculpe, o que quer dizer com isso?
    type: random
    action: error

  - name: error-2
    answer:
      - acho que não estou treinado para responder esse tipo de assunto =(
      - vamos tentar outro assunto?
      - tem certeza que eu sou o robô certo pra falar sobre isso?
    type: random
    action: error

  - name: error-3
    answer:
      - me sinto tão envergonhado, não sei como responder...
      - seria mais fácil se mudassemos de assunto, pelo menos para mim =p
      - não sei, definitivamente não sei responder essa pergunta
    type: random
    action: error


================================================
FILE: training_data/rocket-small.yml
================================================
# Bot goals:
#
# Principais objetivos do Bot:
# 1- Recepcionar novos usuários
# 2- Solucionar dúvidas para curiosos que entram no site
# 3- Trazer novos usuários
# 4- Trazer leads de novos clientes
# 5- Executar Serviços (?)
# -------------------------------------------------------------------------------------------------------------------
trust: .8
interactions:

  - name: configure-debug
    expect:
      - "configure debug-"
      - "set debug-"
      - "let debug-"
      - "turn debug-"
      - "make debug-"
      - "var debug-"
    answer:
      - $key changed to $value!
      - Got it! Now $key is $value
      - Sure thing! $key is set to $value
      - blip blip =] $key equals $value
      - $key = $value -> https://media.giphy.com/media/12NUbkX6p4xOO4/giphy.gif
    context: clear
    action: configure
    type: random
    roleRequired: admin

# Trabalho #
  - name: trabalho-1
    expect:
      - Trabalhar na Rocket.Chat
      - Empregos na Rocket.Chat
      - Vagas na Rocket.Chat
      - Enviar meu curriculo
    answer:
      - Se estiver procurando por oportunidades de trabalho conosco, mande um e-mail para jobs@rocket.chat :)
      - 'Eba! Vamos trabalhar juntos um dia, mande um e-mail pra gente com o seu perfil do linkedin: jobs@rocket.chat'
      - Hmmm te entendi… quer trabalhar comigo né? Mande um e-mail para jobs@rocket.chat, já vou avisando que sou bem competitivo!
    context: clear
    action: respond
    type: random

# + Trabalho +

# Aonde eu encontro vagas abertas?
  - name: trabalho-2
    expect:
      - Onde encontro vagas
      - Onde procuro por vagas
      - Quais as vagas estão abertas
      - busco por vagas
      - estão contratando
    answer:
      - Vai me dizer que quer trabalhar com a gente? Eba!
      - Você pode procurar por vagas abertas aqui nesse https://rocket.chat/jobs  e qualquer coisa envia um email pra jobs@rocket.chat que o pessoal pode te dar mais detalhes!
    action: respond
    type: block

# # Qual o salário da Rocket.Chat?
#   - node:
#       name: trabalho-3
#     expect:
#       - Qual salário
#       - Quanto pagam
#       - O que é pago
#       - Qual a quantia paga
#     answer:
#       - Já quer saber o salário é mercenário? xD Brincadeiras a parte, pra saber qual o salário você pode enviar um email pra jobs@rocket.chat que o pessoal vai poder te ajudar melhor!
#       - Ah, fica entre R$ 10 e R$ 1.000.000,00…, para descobrir primeiro precisamos nos conhecer..
#       - Por mim eu te dava toda grana desse mundinho. Mas como essa parte não fica comigo, manda um e-mail para jobs@rocket.chat que os humanos vão poder te ajudar.
#     event: respond
#     type: random
#
# # Para qual e-mail posso mandar meu currículo?
#   - node:
#       name: trabalho-4
#     expect:
#       - Qual email currículo
#       - Para onde mando currículo
#       - Como mando currículo
#       - Onde mandar currículo
#     answer:
#       - Gostei, acho que vamos nos dar super bem. Você pode mandar o seu currículo para jobs@rocket.chat!
#       - Boa! Manda pra jobs@rocket.chat.
#       - Ai.. já estou imaginando como vai ser.. Nós dois, juntinhos <3 Manda pra jobs@rocket.chat, assim a gente se conhece melhor.
#     event: respond
#     type: random
#
# # Não tem vagas abertas nos site, como faço?
#   - node:
#       name: trabalho-5
#     expect:
#       - Esperando resposta vagas abertas
#       - Não tem vagas abertas no site
#       - O site não está mostrando vagas
#       - Não encontrei uma vaga
#     answer:
#       - Nesse caso, manda o teu currículo para jobs@rocket.chat, assim que tivermos algo que combine com você nós entramos em contato.
#       - Não fique triste! Sempre temos espaço para gente boa, manda teu currículo para jobs@rocket.chat.
#       - Fala com os humanos, eles podem te ajudar a achar algo que combine com você :) jobs@rocket.chat.
#     event: respond
#     type: random
#
# # Não recebi uma resposta sobre o meu currículo
#   - node:
#       name: trabalho-6
#     expect:
#       - Não recebi resposta currículo
#       - Não recebi feedback currículo
#       - Não me contataram sobre o currículo
#       - Ninguém retornou sobre meu currículo
#       - Esperando resposta currículo
#       - Não consigo falar sobre meu currículo
#     answer:
#       - Sério? Bom, algo deve ter acontecido. Manda de novo o teu currículo para jobs@rocket.chat!
#       - Que tal mandar o teu currículo de novo pra jobs@rocket.chat e vermos se encontramos algo?
#     event: respond
#     type: random
#
# # Quando abre o processo seletivo?
#   - node:
#       name: trabalho-7
#     expect:
#       - Data processo seletivo
#       - Como funciona processo seletivo
#       - Etapas processo seletivo
#       - Processo seletivo
#     answer:
#       - Essa pergunta é fácil!
#       - 'Você pode encontrar todas as informações no site: https://rocket.chat/jobs.'
#       - Ou então manda um e-mail para jobs@rocket.chat que assim que tivermos algo te avisamos!
#     event: respond
#     type: block
#
# # Vocês tem vagas para trainee?
#   - node:
#       name: trabalho-8
#     expect:
#       - Vagas para trainee
#       - Como funciona trainee
#       - Trabalham com trainee
#       - Vocês tem programa trainee
#       - Vagas trainee
#     answer:
#       - Dá uma olhada em rocket.chat/jobs! Ainda não temos esse tipo de programa, mas sempre tem coisa nova aparecendo.
#       - Eu nunca vi isso por aqui, mas se bem que os humanos que trabalham comigo parecem super-heróis.. Tem tanta coisa pra fazer que eu me perco, todo dia uma coisa nova..
#       - Ainda não! Mas fica ligado na página https://rocket.Chat/Jobs e na página do facebook, assim você não perde nada.
#     event: respond
#     type: random
#
# # Qual o perfil de quem trabalha na Rocket?
#   - node:
#       name: trabalho-9
#     expect:
#       - Perfil de quem trabalha na rocket.chat
#       - Perfil dos funcionários
#       - Características dos funcionários
#       - Perfil Rocket.Chat
#     answer:
#       - Tem de tudo… super-herói, mágico, piloto de avião,.. Com certeza também tem espaço para você.
#       - Gostamos de pessoas que queiram fazer <3 Pessoas que tenham senso de dono e gostem de se envolver com coisas que vão além das tarefas do dia a dia.
#       - Gente boa! Apaixonada, dedicada e bem-humorada :)
#     event: respond
#     type: random
#
# # Segurança #
#
# Como funciona a segurança das mensagens?
  - name: seguranca-1
    expect:
      - Segurança das mensagens
      - Seguranca do chat
      - Métodos de seguranca
      - Chat é protegido
    answer:
      - Todas as mensagens que forem escritas no chat normal poderão ser visualizadas pelos administradores. Mas se você quiser utilizar o chat criptografado, precisará apenas iniciar uma conversa off-the-record.
      - Para isso você vai precisar clicar no símbolo de uma chave na parte direita da tela do chat que fala OTR (off-the-record)
    action: respond
    type: block
#
# # A versão Demo é segura?
#   - node:
#       name: seguranca-2
#     expect:
#       - Demo segura
#       - segurança da versão demo
#       - Criptografia demo
#       - Proteção na versão demo
#     answer:
#       - Sim! Você pode ter conversas off the record dentro da versão demo.
#       - Se você iniciar uma conversa off the record a sua conversa será criptografada, mas se falar em canais abertos, qualquer pessoa poderá ver.
#     event: respond
#     type: random
#
# # Que tipo de criptografía é utilizada?
#   - node:
#       name: seguranca-3
#     expect:
#       - Criptografía utilizada
#       - Tipo criptografía
#       - Qual criptografia
#     answer:
#       - Pode ficar tranquilo, nosso chat está fortemente protegido. Mas se você quiser certeza que está usando criptografia em suas mensagens acesse o chat off-the-record clicando no símbolo de chave na parte direita da tela do chat.
#       - Depois de ativar essa chavezinha nenhum Hacker vai roubar informações de você, acha que eu não vi Black Mirror?
#     event: respond
#     type: block
#
# # Em que nuvem as mensagens ficam salvas?
#   - node:
#       name: seguranca-4
#     expect:
#       - Nuvem para mensagens
#       - Local de armazenamento das mensagens
#       - Nuvem para armazenamento
#       - Armazenar em qual nuvem
#     answer:
#       - Depende do servidor que você escolher..
#       - 'Nós oferecemos uma nuvem no Google Cloud, você pode ter mais informações sobre o assunto no link: https://rocket.chat/products.'
#     event: respond
#     type: block
#
# # Alguém mais terá acesso às mensagens?
#   - node:
#       name: seguranca-5
#     expect:
#       - Alguém pode ver minhas mensagens
#       - Minhas mensagens ficarão seguras
#       - Quem poderá ver minhas mensagens
#     answer:
#       - O administrador do server pode ter acesso ao banco de dados das mensagens que foram trocadas lá.
#       - Mas se você é do tipo neurótico pode ativar a nossa solução de criptografia usando o ícone chave na direita do chat!
#     event: respond
#     type: block
#
# # É cobrada alguma taxa extra pela segurança das mensagens?
#   # - node:
#   #     name: seguranca-6
#   #   expect:
#   #     - Pagar pela seguranca
#   #     - Custo de segurança das mensagens
#   #     - Pagar pela criptografia
#   #     - Seguranca inclusa no servico
#   #   answer:
#   #     - É bom não ter que pagar nada né…
#   #     - Nós também pensamos assim. Independente da utilização da plataforma, você estará seguro :)
#   #     - 'Você pode ver todos os detalhes sobre esse assunto na página: http://rocket.chat/products'
#   #   event: respond
#   #   type: block
#
# # As mensagens que forem importadas ainda estarão seguras?
#   # - node:
#   #     name: seguranca-7
#   #   expect:
#   #     - Segurança de mensagens importadas
#   #     - Mensagens importadas estarão seguras
#   #     - Proteção de mensagens importadas
#   #     - Criptografia para mensagens e chat importados
#   #     - Continuo protegido importando mensagens
#   #   answer:
#   #     - Claro! Não se preocupe, nós cuidamos de tudo.
#   #     - Hoje nós temos diversos clientes que precisam de uma segurança fortíssima, como bancos e órgãos públicos.
#   #     - 'Você pode ver detalhes sobre isso na página: https://rocket.chat/security'
#   #   event: respond
#   #   type: block
#
# #  Portfolio
# Quem são os clientes de vocês?
  - name: portfolio-1
    expect:
      - Quem são os clientes
      - Quem usa a plataforma
      - Lista de clientes
      - Empresas que usam o Rocket.Chat
      - Quem usa
      - Quem são os usuários do servico
    answer:
      - 'Que bom que você perguntou! Amamos nos exibir, dá uma olhada nos diversos estudos de caso aqui: http://rocket.chat/customers.'
      - 'Tem de tudo! Desde igrejas até bancos e empresas de tecnologia. Normalmente são empresas e/ou grupos que valorizam inovação, criatividade e agilidade.'
      - 'Quer saber se você se encaixa aqui? A resposta é sim! Olha que demais a nossa página de clientes, tem de tudo: http://rocket.chat/customers.'
      - 'Temos bastante clientes aqui, e normalmente eles tem uma coisa em comum: São amantes da tecnologia e querem o sucesso para seu ambiente e seus clientes.'
    action: respond
    type: random
#
# # Vocês tem estudos de Caso?
#   - node:
#       name: portfolio-2
#     expect:
#       - Cases de sucesso
#       - Projetos bem sucedidos
#       - Estudos de caso
#       - Exemplo de utilização
#       - Como os clientes usam
#     answer:
#       - 'Yep! Dá uma olhada aqui: https://rocket.chat/customers.'
#       - 'Sim! Nós já temos diversas organizações utilizando a plataforma e estamos recolhendo a opinião delas sobre a experiência, você pode dar uma olhada nessas histórias aqui: http://rocket.chat/customers.'
#       - 'É tão pouco tempo e tantas histórias.. Chego a ficar nostálgico.. Coloquei algumas delas aqui, caso queira dar uma olhada: https://rocket.chat/customers.'
#     event: respond
#     type: random
#
# # Vocês têm clientes do varejo?
#   - node:
#       name: portfolio-3
#     expect:
#       - Clientes varejo
#       - Varejo
#       - Clientes do varejo
#       - Área de varejo
#     answer:
#       - Sim! temos!
#       - Dá uma olhadinha aqui nos nossos estudos de caso, https://rocket.cht/customers.
#       - Tem inclusive depoimentos de empresas do setor.
#     event: respond
#     type: block
#
# # Vocês atendem agências de marketing?
#   - node:
#       name: portfolio-4
#     expect:
#       - Atender agências de marketing
#       - Servico para agências de marketing
#       - Colaborar com empresas de marketing
#       - Agências de marketing como clientes
#       - Atendem agências marketing
#     answer:
#       - 'Yép! Sabemos que cada cliente é único, mas dá pra ter uma ideia de como as agências nos utilizam olhando aqui:'
#       - 'https://rocket.cht/customers.'
#     event: respond
#     type: block
#
# # Vocês têm clientes da área da saúde?
#   - node:
#       name: portfolio-5
#     expect:
#       - Hospitais como clientes
#       - Atender hospitais
#       - Exemplos de hospitais na plataforma
#       - Serviços para saúde
#     answer:
#       - 'Sim, sabemos que cada cliente é único, mas dá pra ter uma ideia de como as empresas da saúde nos utilizam olhando aqui:'
#       - 'https://rocket.cht/customers.'
#     event: respond
#     type: block
#
# # Vocês têm bancos como clientes?
#   - node:
#       name: portfolio-6
#     expect:
#       - Bancos como clientes
#       - Atender bancos
#       - Exemplos de bancos na plataforma
#       - Serviço para bancos
#     answer:
#       - 'Sim, nós nos orgulhamos muito de ter clientes do mercado financeiro.'
#       - 'O nosso produto é extremamente seguro e personalizável, sabia que trabalhamos com White labeling?'
#       - 'Dá pra ter uma ideia de como as empresas da saúde nos utilizam olhando aqui: https://rocket.cht/customers.'
#     event: respond
#     type: block
#
# # Concorrentes
# Qual a diferença de usar serviços similares?
  - name: concorrentes-1
    expect:
      - Diferenca de usar Slack
      - Diferenca de usar HipChat
      - Diferenca de usar Mattermost
      - Diferenca de usar Gitter
      - Diferenca de usar Ryver
      - Diferenca de usar Riot
      - No que a Rocket é melhor
      - Diferenciais da Rocket
      - Vantagens da rocket em relação aos competidores
      - Rocket e competidores
      - Diferenca de outras ferramentas
    answer:
      - 'Vish, são tantas diferenças… Mas já sabia que você teria essa dúvida, por isso me adiantei e criei uma tabela comparando o nosso produto dos outros :) Olha aqui: https://rocket.chat/whatisthedifference.'
      - 'Não é óbvio? Eles não tem um bot tão legal quanto eu! rsrs. Olha aqui: https://rocket.chat/whatisthedifference.'
      - 'Nós somos muitos e estamos constantemente mudando conforme nossa comunidade quer. Criamos uma tabela comparativa aqui pra mostrar como fazemos: https://rocket.chat/whatisthedifference.'
    action: respond
    type: random
#
# #  Parcerias
# #
# # Vocês patrocinam eventos?
#   - node:
#       name: parcerias-1
#     expect:
#       - Patrocínio para eventos
#       - Colaborar em eventos
#       - Patrocinar eventos
#       - Parcerias para eventos
#       - Interesse em eventos
#     answer:
#       - 'Sim! Entre em contato com a nossa área de marketing que eles podem te auxiliar: marketing@rocket.chat.'
#       - 'Agora até me senti gente grande :) Manda um e-mail para marketing@rocket.chat, o pessoal vai com certeza te pedir mais detalhes para te atender bem.'
#     event: respond
#     type: random
#
# # Gostaria de falar sobre uma possível parceria?
#   - node:
#       name: parcerias-2
#     expect:
#       - Falar sobre parcerias
#       - Trabalham com parcerias
#       - Com quem falar sobre parcerias
#       - Contatos para parcerias ou patrocínios
#       - Possível parceria
#       - Interesse Parceria
#     answer:
#       - Oba! Você quer trabalhar junto comigo então? Faz assim, manda uma mensagem para marketing@rocket.chat.
#       - Parceria é com a gente, nós somos uma plataforma totalmente OpenSource construída através de uma grande parceria com a nossa comunidade :)
#       - Faz assim, manda um e-mail para marketing@rocket.chat que os humanos conseguem te dar mais detalhes.
#     event: respond
#     type: random
#
# # Serviços:
# # White Label
# #
# # Precos White Label
#   - node:
#       name: servicos-1
#     expect:
#       - Preços white label
#       - Custo white label
#       - Orçamento white label
#       - Valor white label
#       - Estimativa financeira white label
#       - Pagar pelo white label
#       - Pagamento white label
#       - Taxas pelo white label
#       - Valor white labeling
#     answer:
#       - Esse é o meu serviço preferido! Dá pra deixar a plataforma do jeitinho que você desejar. Manda um e-mail para sales@rocket.chat que eles podem te dar os detalhes.
#       - Já sabe como você quer a plataforma? Dá para fazer de tudo! Manda um e-mail para sales@rocket.chat que eles podem te ajudar.
#       - Tem diversas possibilidades de white label, manda uma mensagem pro sales@rocket.chat que o pessoal te diz o que mais combina com a tua organização.
#     event: respond
#     type: random
#
# # Como o White Label funciona?
#   - node:
#       name: servicos-2
#     expect:
#       - Funciona o white label
#       - O que é o white label
#       - Explicar o white label
#       - Falar sobre o white label
#       - Incluso no white label
#       - Operar o white label
#       - Utilizar o white label
#       - Como trabalha white label
#       - Sistema de white label
#       - Resumo do white label
#       - Como é feita a customizacão
#     answer:
#       - White Label é quando customizamos o design da plataforma para ficar mais parecido com o da organização que está utilizando a Rocket.chat.
#       - Basicamente nós customizamos a plataforma para ficar com a sua cara :)
#       - 'Customização pura, nós mudamos o logo, as cores, tudo que você imaginar. Tem todos os detalhes aqui: https://rocket.chat/products;'
#     event: respond
#     type: random
#
#   # Tem customização para Apps?
#   - node:
#       name: servicos-3
#     expect:
#       - Personalizar apps
#       - Customizar apps
#       - White label em apps
#       - Apps disponiveis para white label
#       - Modificar os apps
#     answer:
#       - Sim, a customização de Apps é um serviço nosso.
#       - Você pode enviar um email para jobs@rocket.chat ou acessa esse $link
#     event: respond
#     type: block
#
# # Tem uma versão não paga de white label?
#   - node:
#       name: servicos-4
#     expect:
#       - Necessário pagar pelo white label
#       - Fazer white label sozinho
#       - Fazer white label por si só
#       - White label sem pagar
#     answer:
#       - Se você entender de programação, pode fazer sozinho!
#       - Mas se quiser salvar tempo da sua equipe e deixar com a gente para não ter erro. Com um pequeno valor nós mudamos tudo rapidinho.
#       - 'Faz uma cotação com o pessoal: sales@rocket.chat. Eles sabem de tudo.'
#     event: respond
#     type: block
#
#   # Conhece alguém que pode realizar o serviço de white label?
#   - node:
#       name: servicos-5
#     expect:
#       - Indicacoes de white label
#       - Alternativas para fazer white label
#       - Outras sugestões para white label
#       - Outras pessoas para realizar o white label
#       - Empresas para realizar o white label
#     answer:
#       - Sim! Nós podemos fazer para você de forma rápida ou sua própria equipe pode tentar programar para isso. O nosso sistema é OpenSource, ou seja, todo mundo tem acesso.
#       - Indicamos fazer com a gente pois temos toda a sabedoria do código para isso.
#     event: respond
#     type: block
#  # Support
#  #
#  # Preços do suporte
#   - node:
#       name: suporte-1
#     expect:
#       - Preços do suporte
#       - Custo do suporte
#       - Orçamento suporte
#       - Valor do suporte
#       - Estimativa financeira suporte
#       - Pagar pelo suporte
#       - Quantia pelo suporte
#       - Cobrar pelo suporte
#       - Taxas pelo suporte
#     answer:
#       - Nós temos diferentes tipos de suporte, pensando nos diferentes tipos de empresa e demanda. Para saber o valor certinho, manda um e-mail para sales@rocket.chat.
#       - São tantas possibilidades.. Não temos um preço único, porque cada empresa precisa de alguma coisa diferente. Faz assim, manda um e-mail para sales@rocket.chat, logo você saberá a resposta.
#       - 'Só os meus amigos humanos sabem a resposta, fala com eles, prometo que são gente boa: sales@rocket.chat'
#     event: respond
#     type: random
#
#  # Encontrei um Bug. Onde posso reportá-lo?
#   - node:
#       name: suporte-2
#     expect:
#       - Reportar bug
#       - Achei um bug
#       - Encontrei um problema
#       - Problemas com um bug
#       - Identificar bug
#     answer:
#       - Conhece o Github? A nossa comunidade conversa por lá sobre esses assuntos.
#       - 'Se tu não é chegado nesse tipo de interação, sempre poderá nos encontrar pela versão demo no canal #support ou #dev ou #general. Respondemos em tempo real.'
#       - 'Mas também pode mandar e-mail: support@rocket.chat'
#     event: respond
#     type: block
#
#   # Em que língua é feito o suporte?
#   - node:
#       name: suporte-3
#     expect:
#       - Língua do suporte
#       - Linguagem do suporte
#       - Comunicar suporte em que língua
#     answer:
#       - Ora bolas, na língua dos robôs! Nós dominamos tudo por aqui. Brincadeira, é Inglês.
#       - Basicamente em inglês, ainda não temos versões traduzidas de suporte, mas se tiver algum problema em entender, nos avisa que tentaremos te ajudar!
#       - 'Nós optamos por inglês, tá precisando de ajuda? Fala com a gente: support@rocket.chat'
#     event: respond
#     type: random
#
#   # O suporte é feito para usuários finais e organizações igualmente?
#   # - node:
#   #     name: suporte-4
#   #   expect:
#   #     - Para quem serve o suporte
#   #     - A quem se aplica o suporte
#   #     - Suporte aos usuários finais
#   #     - Suporte a empresas
#   #     - Suporte para quem
#   #   answer:
#   #     - Nós temos algumas versões gratuitas e pagas de suporte.
#   #     - Caso a sua demanda se encaixe na versão paga, algumas pessoas dentro da organização ficam responsáveis pelo contato com a área de suporte.
#   #     - 'Fala com a gente que conseguimos te ajudar: support@rocket.chat'
#   #   event: respond
#   #   type: block
#
#   # Como contatar o suporte?
#   - node:
#       name: suporte-5
#     expect:
#       - Contatar o suporte
#       - Falar com o suporte
#       - Informar o suporte
#       - Contato do suporte
#       - Número do suporte
#       - E-mail suporte
#       - Achar o suporte
#       - Reportar ao suporte
#     answer:
#       - 'É só mandar um e-mail: support@rocket.chat ou procurar por nós na versão demo pelos canais #support #dev ou #general'
#       - Feche os olhos, conte até 20 de trás para frente, de três pulinhos (ainda de olhos fechados) e quando abrir, manda oi pra gente pela versão Demo pelos canais #support #dev ou #general :)
#       - Esses caras são super-heróis, fazem tudo! Diz que te indiquei a falar com eles, eles vão gostar. support@rocket.chat.
#     event: respond
#     type: random
#
#   # Qual é o tempo de resposta?
#   # - node:
#   #     name: suporte-6
#   #   expect:
#   #     - Tempo médio resposta
#   #     - Espera pela resposta suporte
#   #     - Esperar resposta suporte
#   #     - Quando vem resposta suporte
#   #   answer:
#   #     - Depende de vários fatores. Se você nos contatar diretamente vamos tentar te atender o mais rápido possível.
#   #     - 'Se for uma modalidade de suporte gratuíto a resposta pode demorar, pois temos uma ordem de prioridade conforme recebemos a demanda dos clientes.  Dá uma olhada se a sua demanda já não está aqui: https://github.com/rocketchat'
#   #     - Se for uma demanda que se encaixe nos planos pagos, vamos te atender conforme o acordado.
#   #   event: respond
#   #   type: block
#
#   # O que está incluso no suporte?
#   - node:
#       name: suporte-7
#     expect:
#       - Como funciona suporte
#       - O que tem no suporte
#       - Incluso no suporte
#       - O que o suporte proporciona
#       - Informações sobre o suporte
#       - Resumo do suporte
#       - Vantagens do suporte
#       - Diferenciais do suporte
#       - Suporte chamadas de vídeo
#       - Suporte chamadas de áudio
#     answer:
#       - Trabalhamos com diferentes modalidades de suporte.
#       - Tem desde consultoria, até customização, atendimento 24x7...
#       - Você pode ver todos os detalhes na nossa página https://rocket.chat/support.
#     event: respond
#     type: block
#
#   # Hosting
#   #
#   # Precos do Hosting
#   - node:
#       name: hosting-1
#     expect:
#       - Custo de Hosting
#       - Precos do Hosting
#       - Variação preços do Hosting
#       - Orçamento Hosting
#       - Valor Hosting
#       - Estimativa financeira Hosting
#       - Cobram Hosting
#       - Taxas pelo Hosting
#     answer:
#       - 'Nós cobramos para hospedar sua plataforma na nossa nuvem, você pode ver os nossos preços de Hosting aqui: https://rocket.chat/hosting.'
#       - Existem diversos serviços relacionados ao nosso hosting, você pode conferir tudo sobre essa possibilidade no link acima.
#     event: respond
#     type: block
#
#   # O que está incluso no Hosting?
#   - node:
#       name: hosting-2
#     expect:
#       - Incluso no hosting
#       - O que tem no hosting
#       - Como funciona o Hosting
#       - O que é Hosting
#       - Para que serve o Hosting
#       - Funcionalidades Hosting
#     answer:
#       - 'Todas as informações sobre hosting estão nesse link aqui: https://rocket.chat/hosting'
#       - 'Hosting é uma forma de deixar suas informações seguras na nuvem, dando flexibilidade para que você acesse seus dados independente de onde estiver. A Rocket.CHat oferece que seus usuários utilizem da sua nuvem para guardar as informações da sua empresa. Olha aqui: https://rocket.chat/hosting'
#       - 'Hosting na nuvem é muito amor <3 Tudo que você precisa, aonde quer que você vá. Olha aqui: https://rocket.chat/hosting'
#     event: respond
#     type: random
#
#   # É possível colocar mais memória no Hosting da Rocket.Chat?
#   - node:
#       name: hosting-3
#     expect:
#       - Memória no Hosting
#       - Adicionar memória Hosting
#       - Mais memória hosting
#       - Memória extra Hosting
#       - Adicionar espaço ao hosting
#       - Mais armazenamento para o Hosting
#       - Funcionamento da memória hosting
#       - Capacidade de armazenamento do Hosting
#       - Qual a capacidade do Hosting
#     answer:
#       - É possível sim, se você quer saber mais sobre isso manda um email pra cloud@rocket.chat
#     event: respond
#     Type: block
#
#   # Como entro em contato com alguém do suporte para o hosting da rocket.chat?
#   - node:
#       name: hosting-4
#     expect:
#       - Suporte para o Hosting
#       - Auxílio com o Hosting
#       - Dúvidas sobre o Hosting
#       - Problemas com o Hosting
#       - Ajuda com o Hosting
#       - Representante do Hosting
#       - Contato de alguém do Hosting
#       - Problemas com o server
#     answer:
#       - 'Se você ainda não usa o nosso hosting, você pode tirar todas as dúvidas por esse e-mail: sales@rocket.chat'
#       - 'Se você já usa, use esse e-mail: support@rocket.chat'
#     event: respond
#     type: block
#
#   # O que são Hosting partners?
#   - node:
#       name: hosting-5
#     expect:
#       - Hosting partners
#       - Significado hosting partners
#       - Para que serve hosting partners
#       - Função Hosting partner
#       - A que se aplicam os hosting partners
#     answer:
#       - São parceiros que também oferecem o serviço de Hosting por um preço e serviço diferente do nosso.
#       - Te interessou? Procura algum aqui rocket.chat/partners
#     event: respond
#     Type: block
#
#   # Posso hospedar?
#   - node:
#       name: hosting-6
#     expect:
#       - Próprio Host
#       - Hospedar no meu servidor
#       - Host Próprio
#       - Criar host próprio
#       - Baixar no meu servidor
#     answer:
#       - Você pode hospedar no seu servidor de forma gratuita ou hospedar conosco e aproveitar das nossas vantagens nuvem :)
#       - 'Você pode ver todos os detalhes aqui: https://rocket.chat/hosting'
#     event: respond
#     Type: block
# # Desenvolvimento de Funcionalidades #
# #
# # Quanto custa para desenvolver novas funcionalidades? #
#   - node:
#       name: desenvolvimento-1
#     expect:
#       - Preco novas funcionalidades
#       - Custo novas funcionalidades
#       - Cobrar novas funcionalidades
#       - Orçamento novas funcionalidades
#       - Lista preços desenvolvimento de funcionalidades
#       - Valor desenvolver novas funcionalidades
#       - Taxas novas funcionalidades
#       - Quantia novas funcionalidades
#     answer:
#       - 'Você pode ter todas as informações com esses caras aqui: sales@rocket.chat'
#       - 'Depende da sua demanda, fala com o pessoal que eles podem te ajudar: sales@rocket.chat'
#       - 'Difícil dizer, temos que verificar com os meus amigos super-humanos! Manda um e-mail que eles respondem rapidinho: sales@rocket.chat'
#     event: respond
#     type: random
#
# # + Importação de Dados +
#
# # Dados podem ser resgatados de outra ferramenta como o Slack? Como isso funciona?
#   - node:
#       name: dados-1
#     expect:
#       - Resgatar dados
#       - Importar dados de ferramentas
#       - Como funcionar para importar dados
#       - Transferir dados
#       - Importacão de dados
#       - Fazer transferência de dados
#       - Importar histórico de conversas
#       - Tipos de importacões
#       - Controle sobre dados importados
#       - Tipos de dados importados
#     answer:
#     - Atualmente nós conseguimos importar dados de algumas ferramentas, como Slack e Hipchat. Entretanto, estamos abertos para ampliar esse leque. É só mandar uma mensagem para support@rocket.chat.
#     - Para maiores informações sobre como fazer isso no Hipchat acesse Import Hipchat.
#     - 'Para o Slack: Import Slack.'
#     event: respond
#     type: block
#
# # É cobrado para importar dados?
#   - node:
#       name: dados-2
#     expect:
#       - Preco para importar dados
#       - Pagar para importar dados
#       - Quanto é para importar dados
#       - Cobrar pela transferência de dados
#     answer:
#     - Nós temos alguns sistemas de importação já desenvolvidos para o Slack, o Hipchat e CSV.  Conforme a nossa necessidade vamos ampliar esse leque, caso você precise dessa funcionalidade com urgência, pode falar com o support@rocket.chat para verificar valores.
#     - Se a sua demanda for para importar do Slack, Hipchat ou CSV, nós temos a sua solução de graça :) Só vamos cobrar se o suporte para essa integração ainda não estiver pronto, assim conseguimos acelerar para suprir a sua demanda. Fale com o support@rocket.chat para mais informações.
#     event: respond
#     type: random
#
# # Vocês têm número de dados para importar?
#   - node:
#       name: dados-3
#     expect:
#       - Limite de dados para importar
#       - Máximo de dados para importar
#       - Quantos dados posso importar
#     answer:
#     - Não temos limite de importação :) Pode ficar tranquilo,  caso já tenhamos desenvolvido o método de importação da sua plataforma tudo que você tiver lá vem para cá.
#     - Nós não temos limites rsrs Ou seja, sem limites de importação.
#     - Pode ficar tranquilo que tudo vai ser repassado, sem limites de importação.
#     event: respond
#     type: random
#
# # O armazenamento dos dados importados será feito em qual nuvem?
#   - node:
#       name: dados-4
#     expect:
#       - Armazenar dados importados onde
#       - Nuvem para armazenar dados importados
#       - Onde ficam os dados importados
#       - Espaco ocupado pelos novos dados importados
#     answer:
#     - Os dados importados podem ficar tanto sobre o domínio da empresa no seu servidor, quanto na nossa nuvem do Google Cloud, permitindo que você acesse os seus dados aonde quer que você esteja.
#     - 'Você pode ter mais informações sobre o assunto no link: https://rocket.chat/products.'
#     event: respond
#     type: block
#
# # Existe algo que não será importado?
#   - node:
#       name: dados-5
#     expect:
#       - Limitações da importação de dados
#       - Tipo de dados que são importados
#       - O que não será importado na importação de dados
#       - O que não será transferido na importação de dados
#     answer:
#       - Você que escolhe :) Permitimos que você importe tudo, na hora de realizar o processo você pode selecionar o que você não quer importar.
#       - A importação fica da forma que você quiser, você pode optar se quer importar tudo ou tirar algo.
#       - Importamos tudo! Você seleciona o que não quiser importar.
#     event: respond
#     type: random
#
#     # + Integrações +
#
# # Existe um limite de integração?
#   - node:
#       name: integracao-1
#     expect:
#       - Máximo de integração
#       - Limite de integracao
#       - Quantas integrações
#     answer:
#       - Não recomendamos que você coloque muuuuitas integrações, pois pode deixar o sistema mais lento, mas nós não temos um limite em relação a isso.
#       - O limite é a sua imaginação :)
#       - Não temos um limite do número de integrações possíveis, mas não recomendamos fazer muitas integrações para não deixar o sistema lento.
#     event: respond
#     type: random
#
# # Que integrações vocês possuem?
#   - node:
#       name: integracao-2
#     expect:
#       - Quais são as integrações
#       - Lista de integrações
#       - Com quem integrar
#       - Disponibilidade de integrações
#       - Integrar com outras aplicações
#     answer:
#       - 'São tantas integrações.. Você pode ver todas aqui: https://rocket.chat/integrations.'
#       - 'Todos os dias ampliamos a variedade de integrações. Dá uma olhada aqui: https://rocket.chat/integrations.'
#     event: respond
#     type: random
#
# # É necessário API para fazer integração?
#   - node:
#       name: integracao-3
#     expect:
#       - API para integracão
#       - Precisar de API
#       - Necessário API
#       - Integrar API
#     answer:
#       - Depende da integração, se você quer saber mais sobre isso manda um email pra support@rocket.chat
#     event: respond
#     type: random
#
# # Como faço uma integração?
#   - node:
#       name: integracao-4
#     expect:
#       - Como é feita uma integração
#       - Aonde acho sobre integração
#       - O que precisa para fazer uma integração
#       - O que é uma integração
#       - Como integrar
#     answer:
#       - 'As integrações possibilitam uma maior conexão da plataforma com outras aplicações. Nós oferecemos diversas integrações, você pode ver elas aqui: https://rocket.chat/integrations'
#       - Aqui você consegue ver as integrações que nós temos, e se busca alguma que não está aqui me fala! Rocket.chat/integrations
#     event: respond
#     type: random
#
#
#   # Produto
#   # Preço
#   #
#   # Quanto custa?
#   - node:
#       name: preco-1
#     expect:
#       - Quanto custa
#       - Qual é o preco
#       - Quanto é cobrado
#       - Tabela de precos
#       - Cobrar pelo servico
#       - Produto precificado
#       - preciso pagar para usar
#       - quanto tem que pagar
#       - existe versão paga
#       - Formas de pagamento
#     answer:
#       - 'O Rocket.Chat é gratuito :) Nós cobramos por serviços de customização, suporte e hospedagem, variando o preço do serviço conforme a demanda. Você pode ver todas as informações aqui: https://rocket.chat/products'
#       - 'A plataforma é gratuita! Mas caso você precise de alguma customização, serviço de suporte ou hospedar a plataforma na nossa nuvem, nós cobramos por isso. Você pode verificar sobre a nossa gama de serviços aqui: https://rocket.chat/products e aqui sobre hospedagem https://rocket.chat/hosting ficar a par dos valores falando com essa galera: sales@rocket.chat'
#     event: respond
#     type: random
#
#   # Vocês podem dar desconto?
#   # - node:
#   #     name: preco-2
#   #   expect:
#   #     - Desconto organizações sem fins lucrativos
#   #     - Conseguir desconto
#   #     - Desconto setor de educação e instituições de ensino
#   #     - Convênios setor de educação
#   #     - Existe desconto
#   #     - Código promocional
#   #     - pode me dar um desconto
#   #   answer:
#   #     - Nós cobramos por serviços extras, como suporte, customização e hospedagem. Esses valores são negociados com sales@rocket.chat conforme a demanda da empresa.
#   #     - Se você é uma instituição sem fins lucrativos ou vem do setor da educação nós temos alguns benefícios para possibilitar que você possa utilizar a plataforma da melhor forma.
#   #     - Nesse caso também entre em contato com sales@rocket.chat
#   #   event: respond
#   #   type: block
#
#   # Preciso pagar por usuários desativados?
#   # - node:
#   #     name: preco-3
#   #   expect:
#   #     - Pagamento de usuarios desativados
#   #     - preciso pagar por usuários desativados
#   #     - usuários desativados
#   #     - Usuários cancelados
#   #     - Exclusão de usuarios
#   #     - Cobrar usuarios desativados
#   #     - cobrar por usuarios
#   #   answer:
#   #     - Nós não cobramos o uso da plataforma do Rocket.chat por usuários. No caso de hospedagem
#   #     - Então depois que você fecha um pacote, pode colocar e adicionar usuários dentro dos limites do pacote a vontade
#   #   event: respond
#   #   type: block
#
#   # Features
#   #
#   # Tem previsão para novas features?
#   - node:
#       name: features-1
#     expect:
#       - previsao de novas features
#       - Data novas features
#       - lançamento mais features
#       - Atualização features
#     answer:
#       - 'Estamos constantemente atualizando as nossas features, você pode acompanhar tudo na nossa página do Github: https://github.com/rocketchat'
#       - Está buscando alguma feature em específico? Da uma olhada no https://github.com/RocketChat e ve se ela não está por lá :)
#     event: respond
#     type: random
#
#   # Quais são as features disponíveis no app?
#   # - node:
#   #     name: features-2
#   #   expect:
#   #     - Features no app
#   #     - O que tem no app
#   #     - Features plataforma mobile
#   #     - Features aplicativo
#   #     - Features chat
#   #     - Material com as features
#   #     - Features disponíveis
#   #     - Resumo das features
#   #     - Quais features tem na Rocket.Chat
#   #   answer:
#   #     - Que bom que você perguntou!
#   #     - Nós ficamos muito orgulhosos do nosso produto.
#   #     - 'Você pode encontrar todas as features da Rocket.Chat no link: https://rocket.chat/features'
#   #   event: respond
#   #   type: block
#
#   # Posso solicitar features exclusivas?
#   - node:
#       name: features-3
#     expect:
#       - solicitar Features exclusivas
#       - Quero pedir uma feature exclusiva
#       - Fazer feature exclusiva
#       - Desenvolver feature personalizada
#       - Sugestao features
#       - Desenvolver features
#       - Pagar por features
#       - Criar novas features
#       - posso sugerir uma feature
#     answer:
#       - Nós estamos desenvolvendo novas features constantemente. Dá uma olhada nesse link do Github e verifica se o que tu busca já está em desenvolvimento.
#       - Se não estiver, existe a possibilidade de desenvolver a nova feature mediante investimento :)
#       - Manda um e-mail para sales@rocket.chat que o pessoal pode te ajudar.
#     event: respond
#     type: block
#
#   # O que é native applications?
#   - node:
#       name: features-4
#     expect:
#       - Significado native application
#       - Explicar native application
#       - O que é native application
#       - Não entendi o que é native applications
#     answer:
#       - Native Applications significa aplicação nativa, sem alterações para rodar a plataforma em Android e iOS.
#       - Nós temos essa opção :)
#     event: respond
#     type: block
#
#  # OpenSource #
#  #
 # O que é OpenSource #
  - name: opensource-1
    expect:
      - Significado opensource
      - O que é opensource
      - Explicar opensource
      - Resumo opensource
      - Como funciona opensource
    answer:
      - OpenSource significa código aberto, a Rocket.Chat é OpenSource, ou seja, todo o nosso código (inclusive euzinho aqui) está disponível no https://github.com/RocketChat.
      - Nós acreditamos que o conhecimento que produzimos desenvolvendo o Rocket.Chat fica melhor quando é compartilhado!
    action: respond
    type: block
#
#   # Quais são os benefícios de usar opensource?
#   - node:
#       name: opensource-2
#     expect:
#       - Benefícios opensource
#       - O que OpenSource traz
#       - Ganho com opensource
#       - Diferenciais opensource
#     answer:
#       - São tantos os benefícios de usar uma plataforma OpenSource… Estudantes e profissionais do mundo todo acabam desenvolvendo o nosso código.
#       - O principal benefício é a possibilidade de customização, agilidade e  inovação constante. O que possibilita a oferta de um produto muito melhor que o dos nossos competidores :)
#       - Você pode encontrar a lista completa de benefícios no nosso blog https://rocket.chat/blog.
#     event: respond
#     type: block
#
  # Como posso contribuir?
  - name: opensource-3
    expect:
      - Como posso contribuir
      - Contribuir com o Rocket.Chat
      - Participar do Rocket.Chat
      - Desenvolver o software opensource
    answer:
      - Você pode entrar na nossa página do Github e ajudar a desenvolver o nosso código :)
      - Você pode desenvolver nosso código na página do Github.
      - Temos uma página do Github com todos os detalhes, ali que a galera toda se reune para desenvolver.
    action: respond
    type: random
#
#   # Qual o tamanho da comunidade de desenvolvedores?
#   # - node:
#   #     name: opensource-4
#   #   expect:
#   #     - Tamanho comunidade de desenvolvedores
#   #     - Número de pessoas na plataforma
#   #     - Tamanho da plataforma
#   #     - Número de usuários da plataforma
#   #     - Quantidade de usuários da plataforma
#   #     - Quantos colaboradores da plataforma
#   #     - Quantos desenvolvedores da plataforma
#   #     - Tamanho comunidade
#   #   answer:
#   #     - Estamos em constante expansão!
#   #     - É difícil dizer o tamanho da nossa comunidade porque cotidianamente temos novos usuários e desenvolvedores.
#   #     - Mas temos mais de 500 pessoas envolvidas com o seu desenvolvimento e mais de 1500 servidores criados.
#   #   event: respond
#   #   type: block
#
#   # + Produtos +
#   # O que é o produto?
#   - node:
#       name: produto-1
#     expect:
#       - O que é o produto
#       - O que é a plataforma
#       - Para que serve a plataforma
#       - Para que serve o Rocket.chat
#       - O que é o Rocket.chat
#       - me explique o rocket.chat
#       - Finalidade do produto
#       - Para que serve o produto
#       - Resumo do produto
#       - Por que o produto foi criado
#     answer:
#       - Nós oferecemos uma plataforma de comunicação totalmente OpenSource (código aberto), oferecendo além das ferramentas de Chat e Live Chat totalmente gratuitas, diversos serviços para suporte, manutenção e customização da plataforma.
#       - É como se fossemos uma alternativa flexível e atualizada do Slack. Atualmente possuímos  a maior e mais ativa comunidade de colaboradores entre os competidores da nossa plataforma :).
#       - Você pode ver todos os detalhes do produto nesse link aqui!
#     event: respond
#     type: block
#
#   # Em caso de problemas em relação ao produto, como devo proceder?
#   - node:
#       name: produto-2
#     expect:
#       - tenho problemas com o produto
#       - quem consegue resolver meus problemas
#       - problemas com o produto
#       - estou tendo problemas com o Rocket.chat
#       - preciso de ajuda para resolver um problema
#     answer:
#       - Se você tiver qualquer problema, fala com a gente! support@rocket.chat
#       - Fácil, se tiver algum problema ou dificuldade utilizando a plataforma, chama a gente! support@rocket.chat.
#       - Você pode olhar no nosso FAQ ou falar com a gente support@rocket.chat
#     event: respond
#     type: random
#
#   # Como instalar o Rocket.Chat vai me beneficiar?
#   - node:
#       name: produto-3
#     expect:
#       - Beneficios do rocket.chat
#       - Vantagens da Rocket.Chat
#       - Porque usar o produto
#       - porque usar o rocketchat
#       - rocketchat aumenta as vendas
#     answer:
#       - O Rocket.Chat é uma ferramenta que está em constante desenvolvimento por ser OpenSource, permitindo que o produto seja continuamente melhorado.
#       - Além de possibilitar um canal de comunicação muito efetivo para times trabalharem em tempo real, possibilita uma grande interação com clientes, por não ter limite de usuários, possibilitar conversas entre empresas e ter o recurso de LiveChat integrado.
#       - Por ser uma plataforma que possui diversas integrações e funciona em diferentes contextos, permitimos que você acesse suas conversas de onde estiver :)
#       - Ah, também somos gratuítos <3
#       - Você pode ver os relatos dos nossos clientes aqui e maiores explicações sobre o produto na nessa página.
#     event: respond
#     type: block
#
#   # É necessária a conexão à Internet para o funcionamento do produto?
#   # - node:
#   #     name: produto-4
#   #   expect:
#   #     - precisa de internet
#   #     - tenho que estar conectado na internet
#   #     - Usar offline
#   #     - tem que ter internet
#   #     - Conectar na rede
#   #   answer:
#   #     - Para acessar remotamente, é preciso ter internet.
#   #     - mas você pode também usar o Rocket.Chat na sua rede local, basta instalar ele em uma máquina acessível por outros usuários na sua intranet.
#   #   event: respond
#   #   type: block
#
#   # Existe limite no período de teste?
#   - node:
#       name: produto-5
#     expect:
#       - Limite do periodo de teste
#       - Duracao do periodo de teste
#       - quanto dura o priodo de teste
#       - Tempo maximo do periodo de teste
#       - Extensao do periodo de teste
#     answer:
#       - Já ouviu falar que o que é bom dura pouco? Então… O período de teste do Hosting é limitado. Mas como o nosso produto é diferenciado, a plataforma vai ser eternamente gratuita!
#       - A plataforma vai continuar sendo gratuita, mas a versão demo tem tempo finito de período de teste.
#     event: respond
#     type: random
#
#   # A Rocket.Chat suporta usuários externos?
#   # - node:
#   #     name: produto-6
#   #   expect:
#   #     - Entrar usuários externos
#   #     - Suporte a usuários externos
#   #     - Pessoas de fora no chat
#   #     - É necessário estar conectado
#   #   answer:
#   #     - Quem decide se quer adicionar usuários externos ou não no seu servidor é o administrador!
#   #     - Dentro de cada server o administrador pode escolher quem vai adicionar ou tirar :)
#   #   event: respond
#   #   type: random
#
#   # Consigo acessar o código do produto?
#   - node:
#       name: produto-7
#     expect:
#       - Acessar o código
#       - Programar o produto
#       - Encontrar o código
#       - Achar o código
#     answer:
#       - O nosso código está disponível em https://github.com/RocketChat/Rocket.Chat
#       - Nossa plataforma é totalmente OpenSource, está tudo disponível em https://github.com/RocketChat/Rocket.Chat
#     event: respond
#     type: random
#
# # Qual o número de usuários que a plataforma suporta?
#   - node:
#       name: produto-8
#     expect:
#       - Limite de usários
#       - Número máximo de usuários
#       - Quantos usuários a plataforma suporta
#       - Restrição de usuários
#       - qual é o limite maximo de usuarios
#     answer:
#       - Ilimitado <3
#       - Cabe todo mundo aqui! Não temos limite de usuários, canais, convidados, mensagens, etc.
#       - Vish, não se preocupa com isso, cabe todo mundo.
#     event: respond
#     type: random
#
#   # Quem administra o pagamento?
#   # - node:
#   #     name: produto-9
#   #   expect:
#   #     - Quem paga a rocket.chat
#   #     - Quem administra a conta
#   #     - Quem faz o pagamento dos serviços
#   #     - quem paga o hosting
#   #     - quem administra os pagamentos
#   #   answer:
#   #     - Nós cobramos por serviços prestados e hosting. Cada empresa que solicita esse tipo de serviço seleciona algumas pessoas para serem os responsáveis desse relacionamento. Quem faz o pagamento depende da própria organização da empresa.
#   #     - Nós somos gratuitos, mas qualquer empresa pode optar produtos pagos e selecionar algumas pessoas para manter o relacionamento com os nossos desenvolvedores. Já o pagamento depende da empresa e de como ela quer se organizar, para a gente não importa se é o CFO ou o estagiário que efetua o pagamento.
#   #   event: respond
#   #   type: random
#
#   # Quais as formas de pagamento da plataforma?
#   - node:
#       name: produto-10
#     expect:
#       - Como pagar os serviços/ hosting
#       - Como realizar o pagamento da plataforma
#       - Como pago os serviços/ hosting
#     answer:
#       - Então, aceitamos de tudo hehe Transferencia, depósito, boleto,etc..
#       - Pode pagar de diversas formas! É só clicar no Hosting que as opções vão aparecer pra você!
#     event: respond
#     type: random
#
#   # Qual a diferença entre Demo e Hosting e Download?
#   - node:
#       name: produto-11
#     expect:
#       - Diferenca demo e hosting
#       - Demo versus hosting
#       - Demo contra hosting
#       - O que é demo e hosting
#     answer:
#       - Os usuários da plataforma possuem essas três opções, mas com objetivos diferentes.
#       - A versão demo sempre vai existir e funciona separado do resto, ela serve para testar o chat, para conversar com os desenvolvedores e pessoas do mundo todo.
#       - Quando uma organização ou time decide usar a plataforma ela pode fazer o download no seu servidor ou usar o nosso serviço de hosting na nuvem.
#     event: respond
#     type: block
#
#   # Qual a diferença entre fazer download e hosting?
#   - node:
#       name: produto-12
#     expect:
#       - Diferenca entre download e hosting
#       - Download versus hosting
#       - Fazer o download ou pagar hosting
#       - Explicar download hosting
#     answer:
#       - São duas coisas que andam em conjunto :)
#       - Quando uma empresa decide usar o Rocket.Chat ela precisa hospedar a plataforma em algum lugar, que pode ser tanto no servidor próprio ou quanto na nossa nuvem. O download pode ser tanto para integrar a Rocket no seu servidor, quando para baixar a plataforma no seu dispositivo. A partir disso você terá que usar o link do servidor que você está utilizando para funcionar :)
#       - 'Você pode ter todas essas informações sobre essa diferença de hospedagem aqui: https://rocket.chat/hosting.'
#     event: respond
#     type: random
#
#   # Qual a diferença entre usar o servidor próprio ou pagar pelo servidor na nuvem da Rocket.Chat?
#   - node:
#       name: produto-13
#     expect:
#       - Diferença entre servidor próprio e pagar pelo servidor
#       - O que é hosting
#       - Por que pagar pelo hosting
#       - Por que pagar pela nuvem
#       - Quais os benefícios de usar na nuvem
#       - Hosting próprio versus pagar pelo hosting na nuvem da Rocket
#       - Por que pagar pelo hosting
#     answer:
#       - 'A plataforma pode ficar hospedada no seu servidor ou você pode usar o nosso servidor na nuvem e desfrutar dos nossos serviços de suporte! Você pode ter todas essas informações aqui: https://rocket.chat/hosting.'
#       - 'Também tive essa dúvida! Tem várias diferenças entre hosting e download, dá uma olhada nesse artigo que ele explica direitinho: https://rocket.chat/hosting.'
#     event: respond
#     type: random
#
#   # Como eu utilizo o Demo?
#   # - node:
#   #     name: produto-14
#   #   expect:
#   #     - Utilizar o demo
#   #     - Como fazer o demo
#   #     - O que fazer com o demo
#   #     - Mexer no demo
#   #     - Porque se chama demo
#   #     - Nome demo
#   #     - Significado de demo
#   #     - Explique demo
#   #   answer:
#   #     - Basta colocar o teu e-mail e começar a usar! O Demo é a versão aberta do Rocket.chat para que pessoas do mundo todo possam conversar e testar a plataforma.
#   #     - É uma versão para testar o Rocket.Chat, uma demonstração. Sem administradores.
#   #   event: respond
#   #   type: random
#
#   # # Depois de fazer o download, como uso?
#   # - node:
#   #     name: produto-15
#   #   expect:
#   #     - Como usar após download
#   #     - Depois do download
#   #     - Uso pós download
#   #     - Utilização do download
#   #     - O que faço após fazer o download
#   #     - Como acesso depois de fazer download
#   #   answer:
#   #     - 'Após o download você precisa apenas logar no server da sua organização, exemplo: https://empresa.rocket.c
Download .txt
gitextract_fk6vyz64/

├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── bot_config.py
├── docker/
│   └── Dockerfile
├── docker-compose.yml
├── docs/
│   ├── config_bot.md
│   └── config_live_transfer.md
├── package.json
├── scripts/
│   ├── actions/
│   │   ├── configure.coffee
│   │   ├── error.coffee
│   │   ├── respond.coffee
│   │   └── rest.coffee
│   ├── bot/
│   │   ├── action-handler.coffee
│   │   ├── classifier.coffee
│   │   └── index.coffee
│   ├── index.coffee
│   └── lib/
│       ├── common.coffee
│       └── security.coffee
└── training_data/
    ├── catbot-en.yml
    ├── corpus.yml
    ├── rest-example.yml
    ├── rocket-small.yml
    └── rocket.yml
Download .txt
SYMBOL INDEX (5 symbols across 1 files)

FILE: bot_config.py
  function get_authentication_token (line 17) | def get_authentication_token():
  function create_user (line 37) | def create_user():
  function create_agent (line 59) | def create_agent():
  function configure_livechat (line 75) | def configure_livechat():
  function create_department (line 91) | def create_department(bot_agent_id):
Condensed preview — 27 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (315K chars).
[
  {
    "path": ".gitignore",
    "chars": 2054,
    "preview": "### Rocketchat ###\n\n# Generated during the docker-compose up\ndata\nuploads\n\n# Created by https://www.gitignore.io/api/vim"
  },
  {
    "path": ".travis.yml",
    "chars": 172,
    "preview": "dist: trusty\n\nlanguage: node_js\nnode_js:\n  - \"node\"\n  - \"8\"\n\nbefore_install:\n  - npm i -g npm@5.6.0\n\ninstall:\n  - npm in"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3218,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 1160,
    "preview": "# Contributing to sdl_cordova_android\n\nThird party contributions are essential for making this repository great. However"
  },
  {
    "path": "LICENSE",
    "chars": 1068,
    "preview": "MIT License\n\nCopyright (c) 2017 Rocket.Chat\n\nPermission is hereby granted, free of charge, to any person obtaining a cop"
  },
  {
    "path": "README.md",
    "chars": 15641,
    "preview": "# Hubot Natural\n\n[![Build Status](https://travis-ci.org/RocketChat/hubot-natural.svg?branch=master)](https://travis-ci.o"
  },
  {
    "path": "bot_config.py",
    "chars": 3283,
    "preview": "#!/usr/bin/env python3\n# coding: utf-8\n\nimport requests\nimport json\nimport os\n\nhost = \"http://rocketchat:3000\"\npath = \"/"
  },
  {
    "path": "docker/Dockerfile",
    "chars": 2514,
    "preview": "FROM node:alpine\n\nLABEL mantainer \"Diego Dorgam <diego.dorgam@rocket.chat>\"\n\nENV HUBOT_LANG='en'                        "
  },
  {
    "path": "docker-compose.yml",
    "chars": 2260,
    "preview": "version: '2'\n\nservices:\n  rocketchat:\n    image: rocketchat/rocket.chat:latest\n    restart: unless-stopped\n    volumes:\n"
  },
  {
    "path": "docs/config_bot.md",
    "chars": 4617,
    "preview": "# Hubot Natural Bot\n\n## Adding Hubot Natural Bot\n\nTo add the bot into your Rocket Chat, you must create an administrator"
  },
  {
    "path": "docs/config_live_transfer.md",
    "chars": 2241,
    "preview": "# Config Live Transfer\n\nIn order to user `Live Transfer` feature, it is necessary to do some steps.\n\nThe first thing to "
  },
  {
    "path": "package.json",
    "chars": 528,
    "preview": "{\n  \"name\": \"hubot-natural\",\n  \"version\": \"0.0.8\",\n  \"private\": true,\n  \"author\": \"Diego Dorgam <diego.dorgam@rocket.cha"
  },
  {
    "path": "scripts/actions/configure.coffee",
    "chars": 1478,
    "preview": "require 'coffeescript/register'\n\nclassifier = require '../bot/classifier'\nsecurity = require '../lib/security'\n{ msgVari"
  },
  {
    "path": "scripts/actions/error.coffee",
    "chars": 265,
    "preview": "require 'coffeescript/register'\n\n{ msgVariables, sendMessages, stringElseRandomKey } = require '../lib/common'\n\nclass Er"
  },
  {
    "path": "scripts/actions/respond.coffee",
    "chars": 1252,
    "preview": "require 'coffeescript/register'\n\n{ msgVariables, sendMessages, stringElseRandomKey } = require '../lib/common'\n\nlivechat"
  },
  {
    "path": "scripts/actions/rest.coffee",
    "chars": 1934,
    "preview": "require 'coffeescript/register'\n\n{ msgVariables, stringElseRandomKey } = require '../lib/common'\n\n# interpolate a string"
  },
  {
    "path": "scripts/bot/action-handler.coffee",
    "chars": 983,
    "preview": "actionHandler = {}\n\nfs = require 'fs'\npath = require 'path'\n\nactionsPath = path.join __dirname, '..', 'actions'\nactions "
  },
  {
    "path": "scripts/bot/classifier.coffee",
    "chars": 5844,
    "preview": "require 'coffeescript/register'\n\nnatural = require 'natural'\n\nclassifier = {}\n\nlang = (process.env.HUBOT_LANG || 'en')\n\n"
  },
  {
    "path": "scripts/bot/index.coffee",
    "chars": 2110,
    "preview": "require 'coffeescript/register'\n\n{ regexEscape, loadConfigfile } = require '../lib/common'\n{ getUserRoles, checkRole } ="
  },
  {
    "path": "scripts/index.coffee",
    "chars": 284,
    "preview": "require 'coffeescript/register'\n\n{ loadConfigfile, getConfigFilePath } = require  './lib/common'\nchatbot = require './bo"
  },
  {
    "path": "scripts/lib/common.coffee",
    "chars": 2739,
    "preview": "fs = require 'fs'\nyaml = require 'js-yaml'\n\ncommon = {}\n\napplyVariable = (string, variable, value, regexFlags = 'i') ->\n"
  },
  {
    "path": "scripts/lib/security.coffee",
    "chars": 718,
    "preview": "security = {}\n\nsecurity.getUserRoles = (robot) ->\n  usersAndRoles = {}\n  robot.adapter.chatdriver.callMethod('getUserRol"
  },
  {
    "path": "training_data/catbot-en.yml",
    "chars": 40143,
    "preview": "trust: .9\ninteractions:\n\n# Greetings\n\n  - name: greeting-hi\n    expect:\n      - hello\n      - hello bot\n      - what's u"
  },
  {
    "path": "training_data/corpus.yml",
    "chars": 22238,
    "preview": "# YAML Model for conversational bot\ntrust: 0.8\ninteractions:\n\n  - name: configure-debug\n    expect:\n      - \"!configure "
  },
  {
    "path": "training_data/rest-example.yml",
    "chars": 24454,
    "preview": "# YAML Model for conversational bot\n\n## You may use YAML templates blocks for simplifing the calls\n#RestTemplateExample:"
  },
  {
    "path": "training_data/rocket-small.yml",
    "chars": 81039,
    "preview": "# Bot goals:\n#\n# Principais objetivos do Bot:\n# 1- Recepcionar novos usuários\n# 2- Solucionar dúvidas para curiosos que "
  },
  {
    "path": "training_data/rocket.yml",
    "chars": 76657,
    "preview": "# Bot goals:\n#\n# Principais objetivos do Bot:\n# 1- Recepcionar novos usuários\n# 2- Solucionar dúvidas para curiosos que "
  }
]

About this extraction

This page contains the full source code of the RocketChat/hubot-natural GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 27 files (293.8 KB), approximately 75.2k tokens, and a symbol index with 5 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!