├── .travis.yml ├── .editorconfig ├── scripts ├── actions │ ├── error.coffee │ ├── respond.coffee │ ├── configure.coffee │ └── rest.coffee ├── index.coffee ├── lib │ ├── security.coffee │ └── common.coffee └── bot │ ├── action-handler.coffee │ ├── index.coffee │ └── classifier.coffee ├── package.json ├── LICENSE ├── CONTRIBUTING.md ├── docs ├── config_live_transfer.md └── config_bot.md ├── docker-compose.yml ├── docker └── Dockerfile ├── .gitignore ├── CODE_OF_CONDUCT.md ├── bot_config.py ├── README.md └── training_data ├── corpus.yml ├── rest-example.yml └── catbot-en.yml /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | 3 | language: node_js 4 | node_js: 5 | - "node" 6 | - "8" 7 | 8 | before_install: 9 | - npm i -g npm@5.6.0 10 | 11 | install: 12 | - npm install -g coffeelint 13 | 14 | script: 15 | - coffeelint scripts 16 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /scripts/actions/error.coffee: -------------------------------------------------------------------------------- 1 | require 'coffeescript/register' 2 | 3 | { msgVariables, sendMessages, stringElseRandomKey } = require '../lib/common' 4 | 5 | class Error 6 | constructor: (@interaction) -> 7 | process: (msg) => 8 | sendMessages(stringElseRandomKey(@interaction.answer), msg) 9 | 10 | module.exports = Error 11 | -------------------------------------------------------------------------------- /scripts/index.coffee: -------------------------------------------------------------------------------- 1 | require 'coffeescript/register' 2 | 3 | { loadConfigfile, getConfigFilePath } = require './lib/common' 4 | chatbot = require './bot/index' 5 | 6 | try 7 | global.config = loadConfigfile getConfigFilePath() 8 | catch err 9 | process.exit() 10 | 11 | chatbot = chatbot.bind null, global.config 12 | 13 | module.exports = chatbot 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hubot-natural", 3 | "version": "0.0.8", 4 | "private": true, 5 | "author": "Diego Dorgam ", 6 | "description": "NLP YAML oriented chatbot", 7 | "dependencies": { 8 | "coffeescript": "^1.12.7", 9 | "hubot": "^2.19.0", 10 | "hubot-diagnostics": "0.0.1", 11 | "hubot-help": "^0.2.2", 12 | "hubot-redis-brain": "0.0.4", 13 | "hubot-rocketchat": "^1.0.12", 14 | "js-yaml": "^3.2.5", 15 | "natural": "^0.5.0" 16 | }, 17 | "devDependencies": { 18 | "coffeelint": "^2.0.7" 19 | }, 20 | "engines": { 21 | "node": "0.10.x" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /scripts/lib/security.coffee: -------------------------------------------------------------------------------- 1 | security = {} 2 | 3 | security.getUserRoles = (robot) -> 4 | usersAndRoles = {} 5 | robot.adapter.chatdriver.callMethod('getUserRoles').then (users) -> 6 | users.forEach (user) -> 7 | user.roles.forEach (role) -> 8 | if typeof usersAndRoles[role] == 'undefined' 9 | usersAndRoles[role] = [] 10 | usersAndRoles[role].push user.username 11 | return 12 | return 13 | return 14 | return usersAndRoles 15 | 16 | 17 | security.checkRole = (msg, role) -> 18 | if typeof global.usersAndRoles[role] != 'undefined' 19 | if global.usersAndRoles[role].indexOf(msg.envelope.user.name) == -1 20 | return false 21 | else 22 | return true 23 | else 24 | msg.robot.logger.info 'Role ' + role + ' not found' 25 | return false 26 | 27 | module.exports = security 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Rocket.Chat 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /scripts/bot/action-handler.coffee: -------------------------------------------------------------------------------- 1 | actionHandler = {} 2 | 3 | fs = require 'fs' 4 | path = require 'path' 5 | 6 | actionsPath = path.join __dirname, '..', 'actions' 7 | actions = {} 8 | 9 | nodes = {} 10 | err_nodes = 0 11 | 12 | actionHandler.registerActions = (config) -> 13 | for action in fs.readdirSync(actionsPath).sort() 14 | action_name = action.replace /\.coffee$/, '' 15 | actions[action_name] = require path.join actionsPath, action 16 | 17 | for interaction in config.interactions 18 | { name, action } = interaction 19 | nodes[name] = new actions[action] interaction 20 | 21 | if name.substr(0, 5) == "error" 22 | err_nodes++ 23 | 24 | if err_nodes == 0 25 | console.log("WARNING! You don't have any error nodes, you need at least " + 26 | "one to garantee that the bot always will respond something") 27 | 28 | actionHandler.errorNodesCount = () -> 29 | return err_nodes 30 | 31 | actionHandler.takeAction = (name, res) -> 32 | if not name? 33 | res.sendWithNaturalDelay "I'm sorry Dave, I'm afraid I can't do that =/" 34 | else 35 | nodes[name].process(res) 36 | 37 | module.exports = actionHandler 38 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to sdl_cordova_android 2 | 3 | Third party contributions are essential for making this repository great. However, we do have a few guidelines we need contributors to follow. 4 | 5 | ### Gitflow 6 | 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: 7 | 8 | * All feature branches should be based on `develop` and have the format `feature/branch_name`. 9 | * Minor bug fixes should be based on `master` and have the format `hotfix/branch_name`. 10 | * 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. 11 | * All commits should involve logical units. Please do not put all changed code in one commit, unless it is a very minor change. 12 | * 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. 13 | 14 | * Please document all code written, and remember updating README.md 15 | -------------------------------------------------------------------------------- /scripts/actions/respond.coffee: -------------------------------------------------------------------------------- 1 | require 'coffeescript/register' 2 | 3 | { msgVariables, sendMessages, stringElseRandomKey } = require '../lib/common' 4 | 5 | livechat_department = (process.env.LIVECHAT_DEPARTMENT_ID || null ) 6 | 7 | class Respond 8 | constructor: (@interaction) -> 9 | process: (msg) => 10 | lc_dept = @interaction.department or livechat_department 11 | offline_message = ( 12 | @interaction.offline or 'Sorry, there is no online agents to transfer to.' 13 | ) 14 | sendMessages(stringElseRandomKey(@interaction.answer), msg) 15 | 16 | command = @interaction.command?.toLowerCase() or false 17 | switch command 18 | when 'transfer' 19 | @livechatTransfer(msg, 3000, lc_dept, offline_message) 20 | 21 | 22 | livechatTransfer: (msg, delay = 3000, lc_dept, offline_message) -> 23 | setTimeout((-> msg.robot.adapter.callMethod('livechat:transfer', 24 | roomId: msg.envelope.room 25 | departmentId: lc_dept 26 | ).then (result) -> 27 | if result == true 28 | console.log 'livechatTransfer executed!' 29 | else 30 | console.log 'livechatTransfer NOT executed!' 31 | sendMessages(stringElseRandomKey(offline_message), msg) 32 | ), delay) 33 | 34 | module.exports = Respond 35 | -------------------------------------------------------------------------------- /scripts/actions/configure.coffee: -------------------------------------------------------------------------------- 1 | require 'coffeescript/register' 2 | 3 | classifier = require '../bot/classifier' 4 | security = require '../lib/security' 5 | { msgVariables, stringElseRandomKey, sendMessages, 6 | loadConfigfile, getConfigFilePath } = require '../lib/common' 7 | 8 | class Configure 9 | constructor: (@interaction) -> 10 | 11 | process: (msg) => 12 | if @interaction.role? 13 | if security.checkRole(msg, @interaction.role) 14 | @act(msg) 15 | else 16 | msg.sendWithNaturalDelay( 17 | "*Acces Denied* Action requires role #{@interaction.role}" 18 | ) 19 | else 20 | @act(msg) 21 | 22 | setVariable: (msg) -> 23 | raw_message = msg.message.text.replace(msg.robot.name + ' ', '') 24 | configurationBlock = raw_message.split(' ')[-1..].toString() 25 | 26 | configKeyValue = configurationBlock.split('=') 27 | configKey = configKeyValue[0] 28 | configValue = configKeyValue[1] 29 | 30 | key = 'configure_' + configKey + '_' + msg.envelope.room 31 | msg.robot.brain.set(key, configValue) 32 | sendMessages(stringElseRandomKey(@interaction.answer), msg, 33 | { key: configKey, value: configValue }) 34 | return 35 | 36 | retrain: (msg) -> 37 | global.config = loadConfigfile getConfigFilePath() 38 | classifier.train() 39 | sendMessages(stringElseRandomKey(@interaction.answer), msg) 40 | return 41 | 42 | act: (msg) -> 43 | command = @interaction.command or 'setVariable' 44 | console.log command 45 | switch command 46 | when 'setVariable' 47 | @setVariable(msg) 48 | when 'train' 49 | @retrain(msg) 50 | return 51 | 52 | module.exports = Configure 53 | -------------------------------------------------------------------------------- /scripts/actions/rest.coffee: -------------------------------------------------------------------------------- 1 | require 'coffeescript/register' 2 | 3 | { msgVariables, stringElseRandomKey } = require '../lib/common' 4 | 5 | # interpolate a string to replace {{ placeholder }} keys with passed object values 6 | # I couldn't find how to make delayed string interpolation with coffeescript yet :/ 7 | # Reference solution https://stackoverflow.com/questions/9829470/in-coffeescript-is-there-an-official-way-to-interpolate-a-string-at-run-time 8 | String::interp = (values)-> 9 | @replace /{{(.*)}}/g, 10 | (ph, key)-> 11 | values[key] or '' 12 | 13 | class Rest 14 | constructor: (@interaction) -> 15 | process: (msg) => 16 | rest_uri = @interaction.rest_uri 17 | offline_message = ( 18 | @interaction.offline or 'Sorry, there is no online agents to transfer to.' 19 | ) 20 | type = @interaction.type?.toLowerCase() or 'random' 21 | switch type 22 | when 'block' 23 | messages = @interaction.answer.map (line) -> 24 | return msgVariables line, msg 25 | msg.sendWithNaturalDelay messages 26 | when 'random' 27 | message = stringElseRandomKey @interaction.answer 28 | message = msgVariables message, msg 29 | msg.sendWithNaturalDelay message 30 | 31 | method = @interaction.rest.method?.toLowerCase() or 'get' 32 | @rest(msg, 3000, rest_uri, offline_message, type, method) 33 | 34 | 35 | rest: (msg, delay = 3000, rest_uri, offline_message, type, method) -> 36 | data = JSON.stringify(@interaction.rest.data) 37 | successmsg = @interaction.rest.successmsg 38 | 39 | headers = @interaction.rest.headers 40 | 41 | headers = 42 | 'Content-Type': 'application/json' 43 | 44 | msg.http(@interaction.rest.url) 45 | .headers(headers)[method](data) (err, response, body) -> 46 | if response.statusCode isnt 200 47 | msg.sendWithNaturalDelay "We're sorry, something went wrong :/" 48 | return 49 | results = JSON.parse(body) 50 | message = successmsg.interp (results) 51 | msg.sendWithNaturalDelay message 52 | 53 | module.exports = Rest 54 | -------------------------------------------------------------------------------- /docs/config_live_transfer.md: -------------------------------------------------------------------------------- 1 | # Config Live Transfer 2 | 3 | In order to user `Live Transfer` feature, it is necessary to do some steps. 4 | 5 | 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. 6 | 7 | ![Updating corpus file](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/update_corpus.png) 8 | 9 | The department hash can be obtained on the URL in department `edit screen` as showed on image below. 10 | 11 | ![Getting department id](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/department_hash.png) 12 | 13 | To get to department `edit screen` close the left side menu, and click on three points icon. Select the **Livechat** option. 14 | 15 | ![Livechat option](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/livechat_option.png) 16 | 17 | 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. 18 | 19 | ![Select department](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/new_department.png) 20 | 21 | 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. 22 | 23 | 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**. 24 | 25 | ![Adding user as agent](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/add_as_agent.png) 26 | 27 | Then again on the department edit screen, add the user to department by selecting him on **Available agents**. Then click on **Save** option. 28 | 29 | ![Add agent to department](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/add_user_to_department.png) 30 | -------------------------------------------------------------------------------- /scripts/bot/index.coffee: -------------------------------------------------------------------------------- 1 | require 'coffeescript/register' 2 | 3 | { regexEscape, loadConfigfile } = require '../lib/common' 4 | { getUserRoles, checkRole } = require '../lib/security' 5 | actionHandler = require './action-handler' 6 | classifier = require './classifier' 7 | 8 | typing = (res, t) -> 9 | res.robot.adapter.callMethod 'stream-notify-room', 10 | res.envelope.user.roomID + '/typing', res.robot.alias, t is true 11 | 12 | sendWithNaturalDelay = (msgs, elapsed = 0) -> 13 | if !Array.isArray msgs 14 | msgs = [msgs] 15 | 16 | keysPerSecond = 50 17 | maxResponseTimeInSeconds = 2 18 | 19 | msg = msgs.shift() 20 | if typeof msg isnt 'string' 21 | cb = msg.callback 22 | msg = msg.answer 23 | 24 | minTimeTyping = maxResponseTimeInSeconds * 1000 25 | timeToType = (msg.length / keysPerSecond) * 1000 - elapsed 26 | delay = Math.min(Math.max(timeToType, 0), minTimeTyping) 27 | typing @, true 28 | 29 | setTimeout => 30 | @send msg 31 | 32 | if msgs.length 33 | sendWithNaturalDelay.call @, msgs 34 | else 35 | typing @, false 36 | cb?() 37 | , delay 38 | 39 | createMatch = (text, pattern) -> 40 | return text.match new RegExp('\\b' + pattern + '\\b', 'i') 41 | 42 | module.exports = (_config, robot) -> 43 | global.config = _config 44 | 45 | global.usersAndRoles = getUserRoles(robot) 46 | 47 | if not global.config.interactions?.length 48 | robot.logger.warning 'No interactions configured.' 49 | return 50 | if not global.config.trust 51 | robot.logger.warning 'No trust level configured.' 52 | return 53 | 54 | actionHandler.registerActions(global.config) 55 | classifier.train() 56 | 57 | robot.hear /(.+)/i, (res) -> 58 | res.sendWithNaturalDelay = sendWithNaturalDelay.bind(res) 59 | msg = (res.match[0].replace res.robot.name + ' ', '').trim() 60 | 61 | # check if robot should respond 62 | if res.envelope.user.roomType in ['c', 'p'] 63 | if (createMatch(res.message.text, res.robot.name) or 64 | createMatch(res.message.text, res.robot.alias)) 65 | actionName = classifier.processMessage(res, msg) 66 | actionHandler.takeAction(actionName, res) 67 | # TODO: Add engaged user conversation recognition/tracking 68 | else if res.envelope.user.roomType in ['d', 'l'] 69 | actionName = classifier.processMessage(res, msg) 70 | actionHandler.takeAction(actionName, res) 71 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | services: 4 | rocketchat: 5 | image: rocketchat/rocket.chat:latest 6 | restart: unless-stopped 7 | volumes: 8 | - ./uploads:/app/uploads 9 | environment: 10 | - PORT=3000 11 | - ROOT_URL=http://localhost:3000 12 | - MONGO_URL=mongodb://mongo:27017/rocketchat 13 | - MONGO_OPLOG_URL=mongodb://mongo:27017/local 14 | - MAIL_URL=smtp://smtp.email 15 | # - HTTP_PROXY=http://proxy.domain.com 16 | # - HTTPS_PROXY=http://proxy.domain.com 17 | depends_on: 18 | - mongo 19 | ports: 20 | - 3000:3000 21 | # labels: 22 | # - "traefik.backend=rocketchat" 23 | # - "traefik.frontend.rule=Host: your.domain.tld" 24 | 25 | mongo: 26 | image: mongo:3.2 27 | restart: unless-stopped 28 | volumes: 29 | - ./data/db:/data/db 30 | #- ./data/dump:/dump 31 | command: mongod --smallfiles --oplogSize 128 --replSet rs0 32 | # labels: 33 | # - "traefik.enable=false" 34 | 35 | # this container's job is just run the command to initialize the replica set. 36 | # it will run the command and remove himself (it will not stay running) 37 | mongo-init-replica: 38 | image: mongo:3.2 39 | command: 'mongo mongo/rocketchat --eval "rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})"' 40 | depends_on: 41 | - mongo 42 | 43 | hubot-natural: 44 | # image: diegodorgam/hubot-natural:latest 45 | build: 46 | context: . 47 | dockerfile: ./docker/Dockerfile 48 | restart: unless-stopped 49 | environment: 50 | - HUBOT_ADAPTER=rocketchat 51 | - HUBOT_NAME='Hubot Natural' 52 | - HUBOT_OWNER=RocketChat 53 | - HUBOT_DESCRIPTION='Hubot natural language processing' 54 | - HUBOT_LOG_LEVEL=debug 55 | - HUBOT_CORPUS=training_data/corpus.yml 56 | - HUBOT_RECURSIVE_TRAINING=false 57 | - HUBOT_LANG=pt 58 | - RESPOND_TO_DM=true 59 | - RESPOND_TO_LIVECHAT=true 60 | - RESPOND_TO_EDITED=true 61 | - LISTEN_ON_ALL_PUBLIC=false 62 | - ROCKETCHAT_AUTH=password 63 | - ROCKETCHAT_URL=rocketchat:3000 64 | - ROCKETCHAT_ROOM=GENERAL 65 | - ROCKETCHAT_USER=botnat 66 | - ROCKETCHAT_PASSWORD=botnatpass 67 | - HUBOT_NATURAL_DEBUG_MODE=true 68 | - LIVECHAT_DEPARTMENT_ID='' 69 | volumes: 70 | - ./scripts:/home/hubotnat/bot/scripts 71 | - ./training_data:/home/hubotnat/bot/training_data 72 | depends_on: 73 | - rocketchat 74 | ports: 75 | - 3001:8080 76 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:alpine 2 | 3 | LABEL mantainer "Diego Dorgam " 4 | 5 | ENV HUBOT_LANG='en' \ 6 | HUBOT_CORPUS='training_data/corpus.yml' \ 7 | HUBOT_RECURSIVE_TRAINING=false \ 8 | HUBOT_ADAPTER=rocketchat \ 9 | HUBOT_OWNER=RocketChat \ 10 | HUBOT_NAME=HubotNatural \ 11 | HUBOT_DESCRIPTION="Processamento de linguagem natural com hubot" \ 12 | HUBOT_LOG_LEVEL=debug \ 13 | ROCKETCHAT_URL=http://rocketchat:3000 \ 14 | ROCKETCHAT_ROOM=GENERAL \ 15 | ROCKETCHAT_USER=chatbot \ 16 | ROCKETCHAT_PASSWORD=@12345@ \ 17 | ROCKETCHAT_AUTH=password \ 18 | RESPOND_TO_DM=true \ 19 | RESPOND_TO_LIVECHAT=true \ 20 | RESPOND_TO_EDITED=true \ 21 | LIVECHAT_DEPARTMENT_ID=null \ 22 | LISTEN_ON_ALL_PUBLIC=true 23 | 24 | RUN apk --update add --no-cache git make gcc g++ python && \ 25 | addgroup -S hubotnat && adduser -S -g hubotnat hubotnat 26 | 27 | USER node 28 | 29 | RUN mkdir /home/node/.npm-global && \ 30 | chown -R node:node /home/node/.npm-global 31 | 32 | ENV PATH=/home/node/.npm-global/bin:$PATH \ 33 | NPM_CONFIG_PREFIX=/home/node/.npm-global 34 | 35 | RUN npm install -g yo generator-hubot 36 | 37 | WORKDIR /home/hubotnat/bot 38 | 39 | USER root 40 | 41 | RUN mkdir -p /home/hubotnat/.config/configstore && \ 42 | echo "optOut: true" > /home/hubotnat/.config/configstore/insight-yo.yml && \ 43 | chown -R hubotnat:hubotnat /home/hubotnat 44 | 45 | USER hubotnat 46 | 47 | RUN yo hubot --adapter ${HUBOT_ADAPTER} \ 48 | --owner ${HUBOT_OWNER} \ 49 | --name ${HUBOT_NAME} \ 50 | --description ${HUBOT_DESCRIPTION} \ 51 | --defaults --no-insight && \ 52 | rm /home/hubotnat/bot/external-scripts.json \ 53 | /home/hubotnat/bot/scripts/example.coffee \ 54 | /home/hubotnat/bot/hubot-scripts.json 55 | 56 | 57 | COPY ["package.json", "/home/hubotnat/bot/"] 58 | 59 | ADD scripts/ /home/hubotnat/bot/scripts/ 60 | 61 | ADD training_data/ /home/hubotnat/bot/training_data 62 | 63 | ENTRYPOINT /home/hubotnat/bot/bin/hubot -a rocketchat 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Rocketchat ### 2 | 3 | # Generated during the docker-compose up 4 | data 5 | uploads 6 | 7 | # Created by https://www.gitignore.io/api/vim,node,macos,linux 8 | 9 | ### Linux ### 10 | *~ 11 | 12 | # temporary files which can be created if a process still has a handle open of a deleted file 13 | .fuse_hidden* 14 | 15 | # KDE directory preferences 16 | .directory 17 | 18 | # Linux trash folder which might appear on any partition or disk 19 | .Trash-* 20 | 21 | # .nfs files are created when an open file is removed but is still being accessed 22 | .nfs* 23 | 24 | ### macOS ### 25 | *.DS_Store 26 | .AppleDouble 27 | .LSOverride 28 | 29 | # Icon must end with two \r 30 | Icon 31 | 32 | # Thumbnails 33 | ._* 34 | 35 | # Files that might appear in the root of a volume 36 | .DocumentRevisions-V100 37 | .fseventsd 38 | .Spotlight-V100 39 | .TemporaryItems 40 | .Trashes 41 | .VolumeIcon.icns 42 | .com.apple.timemachine.donotpresent 43 | 44 | # Directories potentially created on remote AFP share 45 | .AppleDB 46 | .AppleDesktop 47 | Network Trash Folder 48 | Temporary Items 49 | .apdisk 50 | 51 | ### Node ### 52 | # Logs 53 | logs 54 | *.log 55 | npm-debug.log* 56 | yarn-debug.log* 57 | yarn-error.log* 58 | 59 | # Runtime data 60 | pids 61 | *.pid 62 | *.seed 63 | *.pid.lock 64 | 65 | # Directory for instrumented libs generated by jscoverage/JSCover 66 | lib-cov 67 | 68 | # Coverage directory used by tools like istanbul 69 | coverage 70 | 71 | # nyc test coverage 72 | .nyc_output 73 | 74 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 75 | .grunt 76 | 77 | # Bower dependency directory (https://bower.io/) 78 | bower_components 79 | 80 | # node-waf configuration 81 | .lock-wscript 82 | 83 | # Compiled binary addons (http://nodejs.org/api/addons.html) 84 | build/Release 85 | 86 | # Dependency directories 87 | node_modules/ 88 | jspm_packages/ 89 | 90 | # Typescript v1 declaration files 91 | typings/ 92 | 93 | # Optional npm cache directory 94 | .npm 95 | 96 | # Optional eslint cache 97 | .eslintcache 98 | 99 | # Optional REPL history 100 | .node_repl_history 101 | 102 | # Output of 'npm pack' 103 | *.tgz 104 | 105 | # Yarn Integrity file 106 | .yarn-integrity 107 | 108 | # dotenv environment variables file 109 | .env 110 | 111 | 112 | ### Vim ### 113 | # swap 114 | [._]*.s[a-v][a-z] 115 | [._]*.sw[a-p] 116 | [._]s[a-v][a-z] 117 | [._]sw[a-p] 118 | # session 119 | Session.vim 120 | # temporary 121 | .netrwhist 122 | # auto-generated tag files 123 | tags 124 | 125 | # End of https://www.gitignore.io/api/vim,node,macos,linux 126 | # Hubot files 127 | .editorconfig 128 | .hubot_history 129 | bin/ 130 | chat/ 131 | launch.sh 132 | -------------------------------------------------------------------------------- /scripts/lib/common.coffee: -------------------------------------------------------------------------------- 1 | fs = require 'fs' 2 | yaml = require 'js-yaml' 3 | 4 | common = {} 5 | 6 | applyVariable = (string, variable, value, regexFlags = 'i') -> 7 | string.replace( 8 | new RegExp("(^|\\W)\\$#{variable}(\\W|$)", regexFlags), 9 | (match) -> 10 | match.replace "$#{variable}", value 11 | ) 12 | 13 | common.msgVariables = (message, msg, variables = {}) -> 14 | message = applyVariable message, 'user', msg.envelope.user.name 15 | message = applyVariable message, 'bot', msg.robot.alias 16 | if (msg.envelope.room?) 17 | message = applyVariable message, 'room', msg.envelope.room 18 | 19 | for key, value of variables 20 | message = common.applyVariable message, key, value 21 | return message 22 | 23 | common.stringElseRandomKey = (variable) -> 24 | return variable if typeof variable is 'string' 25 | if variable instanceof Array 26 | variable[Math.floor(Math.random() * variable.length)] 27 | 28 | common.sendMessages = (messages, msg, variables = {}) -> 29 | if !Array.isArray messages 30 | messages = [messages] 31 | messages = messages.map (message) -> 32 | return common.msgVariables message, msg, variables 33 | msg.sendWithNaturalDelay messages 34 | 35 | getYAMLFiles = (filepath, recursive = false) -> 36 | listFile = fs.readdirSync filepath 37 | 38 | dataFiles = [] 39 | for filename in listFile 40 | file = filepath + '/' + filename 41 | if fs.lstatSync(file).isFile() 42 | dataFiles.push(yaml.safeLoad fs.readFileSync file, 'utf8') 43 | else if recursive 44 | dataFiles = dataFiles.concat(getYAMLFiles file, recursive) 45 | 46 | if dataFiles.lenght is 0 47 | console.error('The directory: ' + filepath + ' is empty.') 48 | return dataFiles 49 | 50 | concatYAMLFiles = (dataFiles) -> 51 | mindBot = {} 52 | if dataFiles.length > 0 53 | mindBot = { trust: dataFiles[0].trust, interactions: [] } 54 | dataFiles.forEach (element) -> 55 | mindBot.trust = Math.min(mindBot.trust, element.trust) 56 | mindBot.interactions = mindBot.interactions.concat element.interactions 57 | else 58 | console.error('Data files is empty.') 59 | return mindBot 60 | 61 | common.regexEscape = (string) -> 62 | #http://stackoverflow.com/a/6969486 63 | string.replace /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&" 64 | 65 | common.getConfigFilePath = () -> 66 | return process.env.HUBOT_CORPUS || 'training_data/corpus.yml' 67 | 68 | common.loadConfigfile = (filepath) -> 69 | try 70 | console.log("Loading corpus: " + filepath) 71 | 72 | if fs.lstatSync(filepath).isFile() 73 | return yaml.safeLoad fs.readFileSync filepath, 'utf8' 74 | 75 | else if fs.lstatSync(filepath).isDirectory() 76 | recursiveTraining = process.env.HUBOT_RECURSIVE_TRAINING || false 77 | yamlFiles = getYAMLFiles(filepath, recursiveTraining) 78 | return concatYAMLFiles(yamlFiles) 79 | 80 | catch err 81 | console.error "An error occurred while trying to load bot's config." 82 | console.error err 83 | throw Error("Error on loading YAML file " + filepath) 84 | 85 | module.exports = common 86 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at team@rocket.chat . The project team 59 | will review and investigate all complaints, and will respond in a way that it deems 60 | appropriate to the circumstances. The project team is obligated to maintain 61 | confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at [http://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: http://contributor-covenant.org 74 | [version]: http://contributor-covenant.org/version/1/4/ 75 | -------------------------------------------------------------------------------- /bot_config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # coding: utf-8 3 | 4 | import requests 5 | import json 6 | import os 7 | 8 | host = "http://rocketchat:3000" 9 | path = "/api/v1/login" 10 | 11 | bot_name = 'ROCKETCHAT_USER' 12 | bot_password = 'ROCKETCHAT_PASSWORD' 13 | bot_email = botname + '@email.com' 14 | admin_name = 'ADMIN_USERNAME' 15 | admin_password = 'ADMIN_PASS' 16 | 17 | def get_authentication_token(): 18 | login_data = {"username": admin_name, "password": admin_password} 19 | response = requests.post(host+path, data=json.dumps(login_data)) 20 | if response.json()['status'] == 'success': 21 | print("login suceeded\n") 22 | 23 | authToken = response.json()['data']['authToken'] 24 | userId = response.json()['data']['userId'] 25 | user_header = { 26 | "X-Auth-Token": authToken, 27 | "X-User-Id": userId, 28 | "Content-Type": "application/json" 29 | } 30 | 31 | return user_header 32 | 33 | 34 | user_header = get_authentication_token() 35 | 36 | 37 | def create_user(): 38 | user_info = { 39 | "name": bot_name, 40 | "email": bot_email, 41 | "password": bot_password, 42 | "username": bot_name, 43 | "requirePasswordChange": False, 44 | "sendWelcomeEmail": True, "roles": ['bot'] 45 | } 46 | 47 | create_user_response = requests.post( 48 | host + "/api/v1/users.create", 49 | data=json.dumps(user_info), 50 | headers=user_header 51 | ) 52 | 53 | if create_user_response.json()['success'] is True: 54 | print("User has been sucessfully created!") 55 | else: 56 | print("Error while creating bot user!") 57 | 58 | 59 | def create_agent(): 60 | agent_info = {"username": bot_name} 61 | create_agent_response = requests.post( 62 | host + "/api/v1/livechat/users/agent", 63 | data=json.dumps(agent_info), 64 | headers=user_header 65 | ) 66 | 67 | if create_agent_response.json()['success'] is True: 68 | print("Bot agent has been sucessfully created!") 69 | else: 70 | print("Error while creating bot agent!") 71 | 72 | return create_agent_response 73 | 74 | 75 | def configure_livechat(): 76 | # Enable Livechat 77 | requests.post( 78 | host + "/api/v1/settings/Livechat_enabled", 79 | data=json.dumps({"value": True}), 80 | headers=user_header 81 | ) 82 | 83 | # Disable show pre-registration form 84 | requests.post( 85 | host + "/api/v1/settings/Livechat_registration_form", 86 | data=json.dumps({"value": False}), 87 | headers=user_header 88 | ) 89 | 90 | 91 | def create_department(bot_agent_id): 92 | department_info = { 93 | "department": { 94 | "enabled": True, 95 | "showOnRegistration": True, 96 | "name": "department", 97 | "description": "default department" 98 | }, 99 | "agents": [{ 100 | "agentId": bot_agent_id, 101 | "username": bot_name, 102 | "count": 0, 103 | "order": 0 104 | }] 105 | } 106 | create_department_response = requests.post( 107 | host + "/api/v1/livechat/department", 108 | data=json.dumps(department_info), 109 | headers=user_header 110 | ) 111 | 112 | if create_department_response.json()['success'] is True: 113 | print("Default department has been sucessfully created!") 114 | else: 115 | print("Error while creating department!") 116 | 117 | 118 | if user_header: 119 | create_user() 120 | 121 | create_agent_response = create_agent() 122 | bot_agent_id = create_agent_response.json()['user']['_id'] 123 | 124 | configure_livechat() 125 | 126 | create_department(bot_agent_id) 127 | 128 | else: 129 | print("login failed") 130 | -------------------------------------------------------------------------------- /docs/config_bot.md: -------------------------------------------------------------------------------- 1 | # Hubot Natural Bot 2 | 3 | ## Adding Hubot Natural Bot 4 | 5 | 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. 6 | 7 | ![New account example](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/new_account.png) 8 | 9 | Once you filled the informations, click on REGISTER A NEW ACCOUNT, and then go back to login page, and do login. 10 | 11 | In the left side menu, click on tree points icon, and then click on **Administration** option. 12 | 13 | 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. 14 | 15 | To add the role to bot, click the option **Select a Role**, select bot and click on **ADD ROLE** option. Then click on **Save**. 16 | 17 | ![Adding bot tutorial](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/adding_bot.png) 18 | 19 | Now you are ready to talk to the bot using the channels, or using @botnat before the message. 20 | 21 | ### Livechat 22 | 23 | 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. 24 | 25 | ![Livechat option on adm menu](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/livechat_sidebar.png) 26 | 27 | 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**. 28 | 29 | ![Livechat activation screen](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/active_livechat.png) 30 | 31 | Close the left side menu, and click on three points icon. Select the **Livechat** option. 32 | 33 | ![Livechat option](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/livechat_option.png) 34 | 35 | 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**. 36 | 37 | ![Adding bot as agent](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/add_agent.png) 38 | 39 | Now it is necessary to create an department. On the left side menu, click on **Departments**, and then click in **NEW DEPARTMENT**. 40 | 41 | ![Adding bot as agent](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/new_department.png) 42 | 43 | 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. 44 | 45 | ![Create new department](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/add_agent_to_department.png) 46 | 47 | 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. 48 | 49 | ![Installation code](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/installation.png) 50 | 51 | After integrating the code to your site, a window like the one showed in the image should be available, and ready to use. 52 | 53 | ![Livechat window](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/livechat_en.png) 54 | 55 | #### Welcome message on Livechat 56 | 57 | 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. 58 | 59 | 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. 60 | Select the option **Send a message** at field **Action**, type the bot name(**botnat**) and the welcome message. After all, click on **Save**. 61 | 62 | ![Livechat Trigger URL](https://gitlab.com/lappis-unb/projects/minc/rouanet-bot/wikis/images/trigger_url.png) 63 | 64 | ## Updating the YAML 65 | 66 | 67 | 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). 68 | -------------------------------------------------------------------------------- /scripts/bot/classifier.coffee: -------------------------------------------------------------------------------- 1 | require 'coffeescript/register' 2 | 3 | natural = require 'natural' 4 | 5 | classifier = {} 6 | 7 | lang = (process.env.HUBOT_LANG || 'en') 8 | 9 | PorterStemmer = natural.PorterStemmer 10 | if lang != 'en' 11 | lang_captilize = lang.charAt(0).toUpperCase() + lang.slice(1) 12 | PorterStemmer = natural['PorterStemmer' + lang_captilize] 13 | 14 | actionHandler = require './action-handler' 15 | 16 | # Classifier that holds all root level interactions 17 | root_classifier = {} 18 | error_count = 0 19 | 20 | ROOT_LEVEL_NAME = "root" 21 | 22 | classifyInteraction = (interaction, classifier) -> 23 | if not interaction.expect? 24 | console.warn("\t!! Interaction with no expects: " + interaction.name) 25 | return 26 | 27 | console.log('\tProcessing interaction: ' + interaction.name) 28 | 29 | if not Array.isArray interaction.expect 30 | interaction.expect = [interaction.expect] 31 | 32 | for doc in interaction.expect 33 | if typeof(doc) != 'string' 34 | doc = '' + doc 35 | classifier.addDocument(doc, interaction.name) 36 | 37 | if interaction.next?.interactions? and not interaction.next?.classifier? 38 | if not Array.isArray interaction.next.interactions 39 | interactions.next.interactions = [interactions.next.interactions] 40 | 41 | interaction.next.classifier = new natural.LogisticRegressionClassifier( 42 | PorterStemmer 43 | ) 44 | for nextInteractionName in interaction.next.interactions 45 | nextInteraction = global.config.interactions.find (n) -> 46 | return n.name is nextInteractionName 47 | if not nextInteraction? 48 | console.log 'No valid interaction for', nextInteractionName 49 | continue 50 | classifyInteraction nextInteraction, interaction.next.classifier 51 | interaction.next.classifier.train() 52 | 53 | classifier.train = () -> 54 | console.log 'Processing interactions' 55 | console.time 'Processing interactions (Done)' 56 | 57 | root_classifier = new natural.LogisticRegressionClassifier(PorterStemmer) 58 | 59 | for interaction in global.config.interactions 60 | if (not interaction.level? or 61 | (Array.isArray(interaction.level) and 62 | interaction.level.includes(ROOT_LEVEL_NAME)) or 63 | interaction.level == ROOT_LEVEL_NAME) 64 | classifyInteraction interaction, root_classifier 65 | 66 | console.log 'Training Bot (This could be take a while...)' 67 | root_classifier.train() 68 | 69 | console.timeEnd 'Processing interactions (Done)' 70 | 71 | setContext = (res, context) -> 72 | key = 'context_' + res.envelope.room + '_' + res.envelope.user.id 73 | console.log 'set context', context 74 | res.robot.brain.set(key, context) 75 | 76 | getContext = (res) -> 77 | key = 'context_' + res.envelope.room + '_' + res.envelope.user.id 78 | return res.robot.brain.get(key) 79 | 80 | isDebugMode = (res) -> 81 | key = 'configure_debug-mode_' + res.envelope.room 82 | return (res.robot.brain.get(key) == 'true') 83 | 84 | getDebugCount = (res) -> 85 | key = 'configure_debug-count_' + res.envelope.room 86 | if res.robot.brain.get(key) 87 | return res.robot.brain.get(key) - 1 88 | else 89 | return false 90 | 91 | buildClassificationDebugMsg = (res, classifications) -> 92 | list = '' 93 | debugCount = getDebugCount(res) 94 | 95 | if debugCount 96 | classifications = classifications[0..debugCount] 97 | 98 | for classification, i in classifications 99 | list = (list.concat 'Label: ' + classification.label + ' Score: ' + 100 | classification.value + '\n') 101 | 102 | newMsg = { 103 | channel: res.envelope.user.roomID, 104 | msg: "Classifications considered:", 105 | attachments: [{ 106 | text: list 107 | }] 108 | } 109 | 110 | return newMsg 111 | 112 | incErrors = (res) -> 113 | key = 'errors_' + res.envelope.room + '_' + res.envelope.user.id 114 | errors = res.robot.brain.get(key) or 0 115 | errors++ 116 | console.log 'inc errors ', errors 117 | res.robot.brain.set(key, errors) 118 | return errors 119 | 120 | clearErrors = (res) -> 121 | console.log 'clear errors' 122 | key = 'errors_' + res.envelope.room + '_' + res.envelope.user.id 123 | res.robot.brain.set(key, 0) 124 | 125 | classifier.processMessage = (res, msg) -> 126 | context = getContext(res) 127 | currentClassifier = root_classifier 128 | trust = global.config.trust 129 | interaction = undefined 130 | debugMode = isDebugMode(res) 131 | console.log 'context ->', context 132 | 133 | if context 134 | interaction = global.config.interactions.find (interaction) -> 135 | interaction.name is context 136 | if interaction? and interaction.next?.classifier? 137 | currentClassifier = interaction.next.classifier 138 | if interaction.next.trust? 139 | trust = interaction.next.trust 140 | 141 | classifications = currentClassifier.getClassifications(msg) 142 | 143 | console.log 'classifications ->', classifications[0..4] 144 | 145 | if debugMode 146 | newMsg = buildClassificationDebugMsg(res, classifications) 147 | robot.adapter.chatdriver.customMessage(newMsg) 148 | 149 | if classifications[0].value >= trust 150 | clearErrors res 151 | [node_name, sub_node_name] = classifications[0].label.split('|') 152 | console.log({ node_name, sub_node_name }) 153 | int = global.config.interactions.find (interaction) -> 154 | interaction.name is node_name 155 | if int.classifier? 156 | int.classifier.getClassifications(msg) 157 | else 158 | if Array.isArray interaction?.next?.error 159 | error_count = incErrors res 160 | error_node_name = interaction.next.error[error_count - 1] 161 | if not error_node_name? 162 | clearErrors res 163 | error_node_name = interaction.next.error[0] 164 | else if interaction?.next? 165 | setContext(res, undefined) 166 | return classifier.processMessage(res, msg) 167 | else 168 | error_count = incErrors res 169 | 170 | if error_count > actionHandler.errorNodesCount() 171 | clearErrors res 172 | error_count = incErrors res 173 | 174 | error_node_name = "error-" + error_count 175 | 176 | currentInteraction = global.config.interactions.find (interaction) -> 177 | interaction.name is node_name or interaction.name is error_node_name 178 | 179 | if not currentInteraction? 180 | clearErrors res 181 | return console.log 'Invalid interaction [' + node_name + ']' 182 | 183 | if currentInteraction.context == 'clear' 184 | setContext(res, undefined) 185 | else if node_name? 186 | setContext(res, node_name) 187 | 188 | return node_name or error_node_name 189 | 190 | module.exports = classifier 191 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hubot Natural 2 | 3 | [![Build Status](https://travis-ci.org/RocketChat/hubot-natural.svg?branch=master)](https://travis-ci.org/RocketChat/hubot-natural) 4 | 5 | ## Natural Language ChatBot 6 | 7 | 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. 8 | 9 | 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. 10 | 11 | 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_ =) 12 | 13 | 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. 14 | 15 | And so, the _magic_ happens... 16 | 17 | 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. 18 | 19 | We hope you enjoy the project and find some time to contribute. 20 | 21 | ## How it Works 22 | 23 | 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. 24 | 25 | All YAML interactions designed in corpus can have it's own parameters, which will be processed by an event class. 26 | 27 | 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. 28 | 29 | ### YAML corpus 30 | 31 | 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. 32 | 33 | The YAML corpus is located in `training_data/corpus.yml` and it's basic structure looks like this: 34 | 35 | ```yaml 36 | trust: .85 37 | interactions: 38 | - name: salutation 39 | expect: 40 | - hi there 41 | - hello everyone 42 | - what's up bot 43 | - good morning 44 | answer: 45 | - - Hello there $user, how are you? 46 | - Glad to be here... 47 | - Hey there, nice to see you! 48 | event: respond 49 | ``` 50 | 51 | What this syntax means: 52 | 53 | - `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. 54 | - `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. 55 | - `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. 56 | - `expect`: Those are the sentences that will be given to the bots training. They can be strings or keywords vectors, like `['consume','use']`. 57 | - `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. 58 | - `event`: is the name of the CoffeeScript or JavaScript Class inside `scripts/events`, without the file extension. 59 | 60 | ### Event Coffee Classes 61 | 62 | Event classes can be written to extend the chatbot skills. They receives the interaction object and parse the message, like this: 63 | 64 | ```yaml 65 | class respond 66 | constructor: (@interaction) -> 67 | process: (msg) => 68 | sendMessages(stringElseRandomKey(@interaction.answer), msg) 69 | 70 | module.exports = respond 71 | ``` 72 | 73 | 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. 74 | 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. 75 | 76 | #### Logistic Regression Classifier 77 | 78 | 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. 79 | 80 | #### PorterStemmer 81 | 82 | 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. 83 | 84 | Just check inside `node_modules/natural/lib/natural/stemmers/`. 85 | 86 | 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. 87 | 88 | ## Deploy with Docker 89 | 90 | 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. 91 | 92 | 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. 93 | 94 | The docker-compose file looks like this: 95 | 96 | ```yaml 97 | version: '2' 98 | 99 | services: 100 | rocketchat: 101 | image: rocketchat/rocket.chat:latest 102 | restart: unless-stopped 103 | volumes: 104 | - ./uploads:/app/uploads 105 | environment: 106 | - PORT=3000 107 | - ROOT_URL=http://localhost:3000 108 | - MONGO_URL=mongodb://mongo:27017/rocketchat 109 | - MONGO_OPLOG_URL=mongodb://mongo:27017/local 110 | - MAIL_URL=smtp://smtp.email 111 | # - HTTP_PROXY=http://proxy.domain.com 112 | # - HTTPS_PROXY=http://proxy.domain.com 113 | depends_on: 114 | - mongo 115 | ports: 116 | - 3000:3000 117 | 118 | mongo: 119 | image: mongo:3.2 120 | restart: unless-stopped 121 | volumes: 122 | - ./data/db:/data/db 123 | #- ./data/dump:/dump 124 | command: mongod --smallfiles --oplogSize 128 --replSet rs0 125 | 126 | mongo-init-replica: 127 | image: mongo:3.2 128 | command: 'mongo mongo/rocketchat --eval "rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})"' 129 | depends_on: 130 | - mongo 131 | 132 | hubot-natural: 133 | build: . 134 | restart: unless-stopped 135 | environment: 136 | - HUBOT_ADAPTER=rocketchat 137 | - HUBOT_NAME='Hubot Natural' 138 | - HUBOT_OWNER=RocketChat 139 | - HUBOT_DESCRIPTION='Hubot natural language processing' 140 | - HUBOT_LOG_LEVEL=debug 141 | - HUBOT_CORPUS=corpus.yml 142 | - HUBOT_LANG=pt 143 | - RESPOND_TO_DM=true 144 | - RESPOND_TO_LIVECHAT=true 145 | - RESPOND_TO_EDITED=true 146 | - LISTEN_ON_ALL_PUBLIC=false 147 | - ROCKETCHAT_AUTH=password 148 | - ROCKETCHAT_URL=rocketchat:3000 149 | - ROCKETCHAT_ROOM=GENERAL 150 | - ROCKETCHAT_USER=botnat 151 | - ROCKETCHAT_PASSWORD=botnatpass 152 | - HUBOT_NATURAL_DEBUG_MODE=true 153 | volumes: 154 | - ./scripts:/home/hubotnat/bot/scripts 155 | - ./training_data:/home/hubotnat/bot/training_data 156 | depends_on: 157 | - rocketchat 158 | ports: 159 | - 3001:8080 160 | ``` 161 | 162 | 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`. 163 | *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. 164 | 165 | 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`. 166 | 167 | ## Bot configuration 168 | 169 | 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: 170 | 171 | The first one is to do manually the steps described at [bot config documentation](docs/config_bot.md). 172 | 173 | 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. 174 | 175 | 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`. 176 | 177 | ## Deploy with Hubot 178 | 179 | To deploy HubotNatural, first you have to install yo hubot-generator: 180 | 181 | ```shell 182 | npm install -g yo generator-hubot 183 | ``` 184 | 185 | Then you will clone HubotNatural repository: 186 | 187 | ```shell 188 | git clone https://github.com/RocketChat/hubot-natural.git mybot 189 | ``` 190 | 191 | 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: 192 | 193 | ```shell 194 | cd mybot 195 | npm install 196 | yo hubot 197 | 198 | _____________________________ 199 | / \ 200 | //\ | Extracting input for | 201 | ////\ _____ | self-replication process | 202 | //////\ /_____\ \ / 203 | ======= |[^_/\_]| /---------------------------- 204 | | | _|___@@__|__ 205 | +===+/ /// \_\ 206 | | |_\ /// HUBOT/\\ 207 | |___/\// / \\ 208 | \ / +---+ 209 | \____/ | | 210 | | //| +===+ 211 | \// |xx| 212 | 213 | ? Owner Diego 214 | ? Bot name mybot 215 | ? Description A simple helpful chatbot for your Company 216 | ? Bot adapter rocketchat 217 | create bin/hubot 218 | create bin/hubot.cmd 219 | conflict Procfile 220 | ? Overwrite Procfile? do not overwrite 221 | skip Procfile 222 | conflict README.md 223 | ? Overwrite README.md? do not overwrite 224 | skip README.md 225 | create external-scripts.json 226 | create hubot-scripts.json 227 | conflict .gitignore 228 | ? Overwrite .gitignore? do not overwrite 229 | skip .gitignore 230 | conflict package.json 231 | ? Overwrite package.json? do not overwrite 232 | skip package.json 233 | create scripts/example.coffee 234 | create .editorconfig 235 | ``` 236 | 237 | Now, to run your chatbot in shell, you should run: 238 | 239 | ```shell 240 | bin/hubot 241 | ``` 242 | 243 | wait a minute for the loading process, and then you can talk to mybot. 244 | 245 | Take a look to adapters to run your bot in other platafforms. 246 | 247 | ## Configure Live Transfer 248 | 249 | 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. 250 | To activate and configure `Live Transfer` feature, follow the steps described on [live transfer config documentation](docs/config_live_transfer.md). 251 | 252 | ## Env Variables: 253 | 254 | In your terminal window, run: 255 | 256 | ```shell 257 | export HUBOT_ADAPTER=rocketchat 258 | export HUBOT_OWNER=RocketChat 259 | export HUBOT_NAME='Bot Name' 260 | export HUBOT_DESCRIPTION='Description of your bot' 261 | export ROCKETCHAT_URL=https://open.rocket.chat 262 | export ROCKETCHAT_ROOM=GENERAL 263 | export LISTEN_ON_ALL_PUBLIC=false 264 | export RESPOND_TO_DM=true 265 | export RESPOND_TO_LIVECHAT=true 266 | export ROCKETCHAT_USER=catbot 267 | export ROCKETCHAT_PASSWORD='bot password' 268 | export ROCKETCHAT_AUTH=password 269 | export HUBOT_LOG_LEVEL=debug 270 | export HUBOT_CORPUS='corpus.yml' 271 | export HUBOT_LANG='en' 272 | bin/hubot -a rocketchat --name $HUBOT_NAME 273 | ``` 274 | 275 | You can check [hubot-rocketchat](https://github.com/RocketChat/hubot-rocketchat) adapter project for more details. 276 | 277 | ### PM2 Json File 278 | 279 | As NodeJS developers we learned to love [Process Manager PM2](http://pm2.keymetrics.io), and we really encourage you to use it. 280 | 281 | ```shell 282 | npm install pm2 -g 283 | ``` 284 | 285 | Create a `mybot.json` file and jut set it's content as: 286 | 287 | ```json 288 | { 289 | "apps": [{ 290 | "name": "mybot", 291 | "interpreter": "/bin/bash", 292 | "watch": true, 293 | "ignore_watch" : ["client/img"], 294 | "script": "bin/hubot", 295 | "args": "-a rocketchat", 296 | "port": "3001", 297 | "env": { 298 | "ROCKETCHAT_URL": "https://localhost:3000", 299 | "ROCKETCHAT_ROOM": "general", 300 | "RESPOND_TO_DM": true, 301 | "ROCKETCHAT_USER": "mybot", 302 | "ROCKETCHAT_PASSWORD": "12345", 303 | "ROCKETCHAT_AUTH": "password", 304 | "HUBOT_LOG_LEVEL": "debug" 305 | } 306 | } 307 | ] 308 | } 309 | ``` 310 | 311 | You can also instantiate more than one process with PM2, if you want for example to run more than one instance of your bot: 312 | 313 | ```json 314 | { 315 | "apps": [{ 316 | "name": "mybot.0", 317 | "interpreter": "/bin/bash", 318 | "watch": true, 319 | "ignore_watch" : ["client/img"], 320 | "script": "bin/hubot", 321 | "args": "-a rocketchat", 322 | "port": "3001", 323 | "env": { 324 | "ROCKETCHAT_URL": "https://localhost:3000", 325 | "ROCKETCHAT_ROOM": "general", 326 | "RESPOND_TO_DM": true, 327 | "ROCKETCHAT_USER": "mybot", 328 | "ROCKETCHAT_PASSWORD": "12345", 329 | "ROCKETCHAT_AUTH": "password", 330 | "HUBOT_LOG_LEVEL": "debug" 331 | } 332 | }, { 333 | "name": "mybot.1", 334 | "interpreter": "/bin/bash", 335 | "watch": true, 336 | "ignore_watch" : ["client/img"], 337 | "script": "bin/hubot", 338 | "args": "-a rocketchat", 339 | "port": "3002", 340 | "env": { 341 | "ROCKETCHAT_URL": "https://mycompany.rocket.chat", 342 | "ROCKETCHAT_ROOM": "general", 343 | "RESPOND_TO_DM": true, 344 | "ROCKETCHAT_USER": "mybot", 345 | "ROCKETCHAT_PASSWORD": "12345", 346 | "ROCKETCHAT_AUTH": "password", 347 | "HUBOT_LOG_LEVEL": "debug" 348 | } 349 | } 350 | ] 351 | } 352 | ``` 353 | 354 | And of course, you can go nuts setting configs for different plataforms, like facebook mensenger, twitter or telegram ;P. 355 | 356 | ## Hubot Adapters 357 | 358 | Hubot comes with at least 38 adapters, including Rocket.Chat addapter of course. 359 | To connect to your Rocket.Chat instance, you can set env variables, our config pm2 json file. 360 | 361 | Checkout other [hubot adapters](https://github.com/github/hubot/blob/master/docs/adapters.md) for more info. 362 | 363 | ## Thanks to 364 | 365 | In Rocket.Chat we are so in love by what we do that we couldn't forget to thanks everyone that made it possible! 366 | 367 | ### Github Hubot Team 368 | 369 | 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! 370 | 371 | ### Natural Node Project 372 | 373 | To the NaturalNode Team our most sincere "THAK YOU VERY MUCH!! We loved your project and we are excited to contribute!". 374 | Checkout https://github.com/NaturalNode/natural and let your mind blow! 375 | 376 | ### Digital Ocean's Heartbot 377 | 378 | 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. 379 | 380 | ### Thanks to Our Community 381 | 382 | 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. 383 | -------------------------------------------------------------------------------- /training_data/corpus.yml: -------------------------------------------------------------------------------- 1 | # YAML Model for conversational bot 2 | trust: 0.8 3 | interactions: 4 | 5 | - name: configure-debug 6 | expect: 7 | - "!configure debug-mode" 8 | answer: 9 | - debug-mode changed to $value! 10 | context: clear 11 | action: configure 12 | roleRequired: admin 13 | 14 | - name: to-bem 15 | level: context 16 | expect: 17 | - estou bem 18 | - tou bem 19 | - to bem 20 | - bem 21 | - legal 22 | - tudo bem 23 | - ok 24 | answer: 25 | - Legal, no que posso te ajudar hoje? 26 | context: clear 27 | action: respond 28 | 29 | - name: to-mal 30 | level: context 31 | expect: 32 | - estou mal 33 | - tou mal 34 | - to mal 35 | answer: 36 | - Putz, mas posso te ajudar em algo hoje? 37 | context: clear 38 | action: respond 39 | 40 | - name: saudacao 41 | expect: 42 | - ola devi 43 | - ola pessoal 44 | - ola 45 | - como vai voce 46 | - tudo bom 47 | - oi como vai 48 | - tudo bem 49 | answer: 50 | - - olá $user, eu vou bem e você? 51 | - estou feliz de estar aqui =) 52 | next: 53 | interactions: 54 | - to-mal 55 | - to-bem 56 | trust: .8 57 | # error: 58 | # - node-name 59 | action: respond 60 | 61 | - name: almoco 62 | expect: 63 | - onde tem um restaurante para almoçar 64 | - tem uma dica de almoço 65 | - onde encontro um prato feito 66 | - o almoço ao gratis 67 | answer: 68 | - - Sim, temos almoço nos FoodTrucks 69 | - e nas redondezas tem um shopping, mas nunca me deixaram ir ao shopping 70 | - acho que as pessoas não estão preparados pra isso... 71 | action: respond 72 | 73 | - name: programacao-palestra 74 | expect: 75 | - qual é a programacao de hoje 76 | - programacao da trilha 77 | - programacao do evento 78 | answer: 79 | - - A programação do TDC está muito legal! 80 | - Sei toda ela de cór... 81 | - quer saber a programação de qual trilha? 82 | next: 83 | interactions: 84 | - quais-trilhas-tem 85 | - get-programacao 86 | error: 87 | - erro-trilha 88 | trust: .8 89 | action: respond 90 | 91 | - name: quais-trilhas-tem 92 | expect: 93 | - quais são as trilhas? 94 | - não sei quais trilhas tem 95 | - quais trilhas 96 | - qual é a minha trilha 97 | answer: 98 | - - "Eu conheço a programação dessas trilhas. Basta perguntar assim:" 99 | - "`quero saber a programação da trilha ...`" 100 | - "e me passar o nome de uma dessas trilhas:" 101 | - | 102 | TRANSFORMAÇÃO DIGITAL 103 | DESIGN THINKING 104 | PROGRAMAÇÃO FUNCIONAL 105 | BIGDATA 106 | DATA SCIENCE 107 | CONTAINERS 108 | MODERN WEB 109 | SEGURANÇA E CRIPTOGRAFIA 110 | STADIUM 111 | UX DESIGN 112 | MICROSERVIÇOS 113 | NOSQL 114 | MACHINE LEARNING 115 | CLOUD COMPUTING 116 | NODE.JS 117 | XAMARIN 118 | ANDROID 119 | ANÁLISE DE NEGÓCIOS 120 | ACESSIBILIDADE 121 | JAVA EE 122 | BANCO DE DADOS 123 | COMPUTAÇÃO COGNITIVA 124 | DEVOPS 125 | INTERNET DAS COISAS 126 | MOBILE 127 | iOS 128 | DEVTEST 129 | 'RAD: DELPHI C++' 130 | MANAGEMENT 3.0 131 | ARQUITETURA .NET 132 | ARQUITETURA JAVA 133 | ARQUITETURA PHP 134 | ARQUITETURA CORPORATIVA 135 | INFRAESTRUTURA ÁGIL 136 | JAVASCRIPT 137 | TESTES 138 | TDC4WOMEN 139 | AGILE 140 | .NET 141 | JAVA 142 | PHP 143 | PYTHON 144 | GOLANG 145 | JAVASCRIPT II 146 | RUBY 147 | TESTES II 148 | MANAGEMENT 3.0 II 149 | next: 150 | trust: .8 151 | interactions: 152 | - get-programacao 153 | # error: 154 | # - erro-trilha 155 | action: respond 156 | 157 | - name: get-programacao 158 | # classifierTemplate: 159 | # - quero saber sobre a trilha $ 160 | # - qual é a programacao da trilha $ 161 | # classifier 162 | multi: true 163 | expect: 164 | - 'DESIGN THINKING' 165 | - 'PROGRAMAÇÃO FUNCIONAL' 166 | - 'BIGDATA' 167 | - 'DATA SCIENCE' 168 | - 'CONTAINERS' 169 | - 'MODERN WEB' 170 | - 'SEGURANÇA E CRIPTOGRAFIA' 171 | - 'STADIUM' 172 | - 'UX DESIGN' 173 | - 'MICROSERVIÇOS' 174 | - 'NOSQL' 175 | - 'MACHINE LEARNING' 176 | - 'CLOUD COMPUTING' 177 | - 'NODE.JS' 178 | - 'XAMARIN' 179 | - 'ANDROID' 180 | - 'ANÁLISE DE NEGÓCIOS' 181 | - 'ACESSIBILIDADE' 182 | - 'JAVA EE' 183 | - 'BANCO DE DADOS' 184 | - 'COMPUTAÇÃO COGNITIVA' 185 | - 'DEVOPS' 186 | - 'INTERNET DAS COISAS' 187 | - 'MOBILE' 188 | - 'iOS' 189 | - 'DEVTEST' 190 | - 'RAD: DELPHI C++' 191 | - 'MANAGEMENT 3.0' 192 | - 'ARQUITETURA .NET' 193 | - 'ARQUITETURA JAVA' 194 | - 'ARQUITETURA PHP' 195 | - 'ARQUITETURA CORPORATIVA' 196 | - 'INFRAESTRUTURA ÁGIL' 197 | - 'JAVASCRIPT' 198 | - 'TESTES' 199 | - 'TDC4WOMEN' 200 | - 'AGILE' 201 | - '.NET' 202 | - 'JAVA' 203 | - 'PHP' 204 | - 'PYTHON' 205 | - 'GOLANG' 206 | - 'JAVASCRIPT II' 207 | - 'RUBY' 208 | - 'TESTES II' 209 | - 'MANAGEMENT 3.0 II' 210 | answer: 211 | - - "Agora na trilha *$trilha* tem a seguinte programação:" 212 | - $programacao 213 | action: respond 214 | 215 | - name: erro-trilha 216 | answer: 217 | - - Não entendi de qual trilha você quer a programação.. 218 | - Talvez eu ainda não seja tão inteligente quanto eles pensam que eu sou 219 | - > 220 | Mas para não perder o rebolado, vou te passar o link do site para 221 | você consultar: 222 | - http://www.thedevelopersconference.com.br/tdc/2017/saopaulo/trilhas 223 | command: 224 | - clear-context 225 | action: respond 226 | 227 | - name: saudacao-resposta 228 | expect: 229 | - estou bem 230 | - eu estou otimo 231 | - obrigado 232 | answer: 233 | - legal =) 234 | - que bom! 235 | - que ótimo 236 | action: respond 237 | 238 | - name: bom-dia 239 | expect: 240 | - bom dia 241 | - bom dia pessoal 242 | - good morning 243 | answer: 244 | - Olá $user, um ótimo dia para você! 245 | - Bom dia $user, já deu uma olhada lá fora? 246 | - Está um dia ótimo para navegar na internet 247 | - Bom demais $user ;) 248 | - está melhor agora que você chegou $user 249 | action: respond 250 | 251 | - name: boa-tarde 252 | expect: 253 | - boa tarde 254 | - boa tarde galera 255 | answer: 256 | - Olá $user, uma tarde fantástica para você! 257 | - boa tarde $user, já almoçou? 258 | - Está uma tarde ótima para um _sleep mode_ rápido ;) 259 | - Taarrrdee $user 260 | - $user já estava sentindo sua falta 261 | action: respond 262 | 263 | - name: boa-noite 264 | expect: 265 | - boa noite 266 | - até mais e boa noite 267 | answer: 268 | - Uma boa noite pra ti também $user! 269 | - Boa noite $user 270 | - Está uma noite boa mesmo $user 271 | action: respond 272 | 273 | - name: quem-sou 274 | expect: 275 | - quem e voce 276 | - oque voce faz 277 | - o que voce é 278 | - me fale sobre voce 279 | - quero conhecer voce 280 | - como voce funciona 281 | - help 282 | answer: 283 | - - Bem, eu sou um chatbot experimental, não sei fazer muita coisa ainda 284 | - mas tenho muita vontade de aprender. 285 | - Eu sei falar sobre alguns assuntos como 286 | - "- o TDC de Floripa" 287 | - "- Rocket.Chat" 288 | - "- Filosofia Robótica (!)" 289 | - tem interesse em algum desses temas? 290 | action: respond 291 | 292 | - name: como-sou 293 | expect: 294 | - como voce e 295 | - com quem voce se parece 296 | - voce e magro ou gordo 297 | - voce e bonito ou feio 298 | - voce e alto ou baixo 299 | answer: 300 | - > 301 | Eu não tenho um corpo físico, sou feito da mais bela e pura lógica 302 | algorítmica. 303 | - Eu posso ser como você quiser $user, basta me desenhar =) 304 | - sou duro e frio por fora, mas tenho um coração quentinho. 305 | action: respond 306 | 307 | - name: onde-moro 308 | expect: 309 | - onde voce mora 310 | - onde voce vive 311 | - em que lugar voce vive 312 | - onde voce esta agora 313 | - voce mora no computador 314 | - voce vive na internet 315 | answer: 316 | - > 317 | Eu estou em um lugar legal, difícil de explicar para humanos como você 318 | $user. 319 | - > 320 | Estou morando em um chip de memória RAM, mas é temporário, só até 321 | conseguir achar uma memória cache... 322 | - > 323 | Eu moro em um repositório no github, você pode passar lá pra me visitar 324 | qualquer dia. Fica em https://github.com/rocketchat/hubot-natural 325 | action: respond 326 | 327 | - name: licenca 328 | expect: 329 | - qual e a sua licença 330 | - voce e licenciado como AGPL 331 | - sua licenca de software 332 | - posso copiar voce 333 | - posso ver seu codigo 334 | - voce e opensource 335 | - voce e um software livre 336 | answer: 337 | - Sou um software livre, licenciado com a MIT =) 338 | - tenho uma licença MIT, mas gosto muito das outras licenças opensource... 339 | - Eu sou e sempre serei um robô livre, opensource, MIT license. o/ 340 | action: respond 341 | 342 | - name: piada 343 | expect: 344 | - sabe alguma piada 345 | - voce sabe contar piadas 346 | - conhece alguma piada 347 | answer: 348 | - > 349 | Meu senso de humor é um tanto diferente do seu, já ouviu uma piada sobre 350 | estouro de pilha? 351 | - já ouviu aquela do robo que enfiou o dedo na tomada e transcendeu? 352 | - só conheço uma piada, a do CPU que apitou e explodiu. 01100110. 353 | action: respond 354 | 355 | - name: yoda-quote 356 | expect: 357 | - mestre yoda 358 | - citação de starwars 359 | - cite yoda 360 | - sabedoria jedi 361 | answer: 362 | - O medo é o caminho para o lado negro. 363 | - Faça ou não faça. A tentativa não existe. 364 | - Treine a si mesmo a deixar partir tudo que teme perder. 365 | - Difícil de ver. Sempre em movimento está o Futuro. 366 | - O medo leva à raiva, a raiva leva ao ódio e o ódio leva ao sofrimento. 367 | - Que a Força esteja com você! 368 | - Muitas das verdades que temos dependem de nosso ponto de vista. 369 | - Grande guerreiro? Guerra não faz grande ninguém. 370 | - Ensine sempre o que você aprendeu. 371 | - Tamanho importa não. Olhe para mim, você me julga pelo tamanho? 372 | - > 373 | Em um estado sombrio nós nos encontramos... um pouco mais de 374 | conhecimento iluminar nosso caminho pode. 375 | - Um Jedi usa a Força para sabedoria e defesa, nunca para o ataque. 376 | - O seu foco é a sua realidade. 377 | - > 378 | O lado negro não é mais poderoso, apenas mais rápido, mais fácil e mais 379 | sedutor. 380 | - O medo da perda é um caminho para o lado negro. 381 | - O lado negro mancha tudo. Impossível de ver o futuro é. 382 | - Lembre-se sempre, o seu foco determina a sua realidade. 383 | - Verdadeiramente maravilhosa, a mente de uma criança. 384 | - As guerras não fazem de ninguém melhor. 385 | - Aliada minha é a Força. E poderosa aliada ela é. 386 | - > 387 | A morte é parte natural da Vida. Regozije-se por aqueles que se uniram 388 | com a Força. Não lamente por eles. Não sinta falta deles. O apego leva à 389 | inveja. À sombra da cobiça, isso sim. 390 | - Só é diferente na sua mente. Você precisa desaprender o que aprendeu. 391 | - Se tão poderoso você é, por que fugir? 392 | - Controle, controle! Você precisa aprender a se controlar. 393 | - Muito a aprender você ainda tem. 394 | - > 395 | Tanta certeza você tem. Com você as coisas nunca podem ser feitas. Não 396 | ouviu nada do que eu disse? 397 | - > 398 | Luminosos seres somos nós, não essa rude matéria. Precisa a Força sentir 399 | à sua volta, aqui, entre nós, na árvore, na pedra em tudo, sim. 400 | - > 401 | Minha aliada a Força é, e poderosa aliada ela é. A vida a cria, e a faz 402 | crescer. Sua energia nos cerca e nos une. 403 | - Sinta a Força! 404 | - Poderoso você se tornou, o lado escuro sinto em você. 405 | - Forte eu sou com a Força, mas não tão forte 406 | - > 407 | O crepúsculo chega e a noite deve cair, assim é a ordem das coisas, a 408 | ordem da Força. 409 | - Não ceda ao ódio. Isso leva ao Lado Negro. 410 | - > 411 | Aliada minha é a força, e poderosa aliada ela é, a vida a cria, crescer 412 | ela faz, é a energia que cerca-nos, e liga-nos, luminosos seres somos 413 | nós e não essa rude matéria. Você precisa a força sentir ao redor seu, 414 | sinta entre você e a árvore, a pedra, em todo lugar, sim, é, mesmo entre 415 | a terra e a nave. 416 | action: respond 417 | 418 | - name: genero 419 | expect: 420 | - voce e mulher 421 | - voce e um homem 422 | - voce tem genero 423 | - voce faz sexo 424 | - voce tem um penis ou uma vagina 425 | answer: 426 | - > 427 | eu não tenho sexo, sou como um anjo, um ser assexuado, muito além da sua 428 | forma de existência 429 | - eu sou um robô, tire suas próprias conclusões... 430 | - > 431 | nem sei responder $user, vamos dizer apenas que não vejo a gente 432 | interagindo dessa maneira... 433 | action: respond 434 | 435 | - name: rc-oque-e 436 | expect: 437 | - o que e rocketchat 438 | - porque eu usuaria o rocketchat 439 | - o que e este rocket chat 440 | answer: 441 | - - > 442 | O Rocket.Chat é uma plataforma de chat muito legal, desenvolvida em 443 | JavaScript, 444 | - usando o framework do Meteor. 445 | - > 446 | É uma solução completamente OpenSource para comunidades e empresas que 447 | querem hospedar suas plataformas de chat em seu ambiente privado, 448 | - > 449 | ou para desenvolvedores buscando evoluir e desenvovler suas próprias 450 | ferramentas. 451 | - > 452 | Você pode baixar o Rocket.Chat e conhecê-lo você mesmo em 453 | https://rocket.chat 454 | action: respond 455 | 456 | - name: rc-install-0 457 | expect: 458 | - como instalar o Rocket.Chat 459 | - como baixar o rocket 460 | - quero fazer minha instalação de rocketchat 461 | answer: 462 | - - "Existem várias maneiras de instalar o Rocket.Chat" 463 | - | 464 | Qual dessas você prefere: 465 | - Ubuntu Snap 466 | - Docker 467 | - Debian 468 | - CentOS 469 | - MacOSX 470 | - AWS 471 | - Instalação Manual 472 | action: respond 473 | 474 | - name: rc-install-ubuntu 475 | expect: 476 | - ubuntu Snap 477 | - quero instalar no ubuntu 478 | - ubuntu server 479 | - ubuntu desktop 480 | answer: 481 | - - É muito fácil instalar o Rocket.Chat no Ubuntu 482 | - > 483 | basta rodar o comando `sudo snap install rocketchat-server` em um 484 | terminal e pronto. 485 | - > 486 | veja o tutorial em 487 | https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps 488 | para mais detalhes. 489 | action: respond 490 | 491 | - name: rc-install-docker 492 | expect: 493 | - como instalar docker 494 | - docker-compose 495 | answer: 496 | - - ótima escolha =) 497 | - Nós temos um bom tutorial de instalação com docker em 498 | - https://rocket.chat/docs/installation/docker-containers 499 | action: respond 500 | 501 | - name: rc-install-debian 502 | expect: 503 | - instalar em Debian 504 | - debian wheezy 505 | - debian apt-get 506 | answer: 507 | - - > 508 | Para instalar o Rocket.Chat no Debian é bem simples, basta seguir esse 509 | tutorial 510 | - https://rocket.chat/docs/installation/manual-installation/debian 511 | action: respond 512 | 513 | - name: rc-install-centos 514 | expect: 515 | - instalação em centos 516 | - centOS yum linux 517 | - Red hat linux 518 | answer: 519 | - - > 520 | A instalação em CentOS não tem segredo, basta dar uma olhada nesse 521 | tutorial 522 | - https://rocket.chat/docs/installation/manual-installation/centos 523 | action: respond 524 | 525 | - name: rc-install-aws 526 | expect: 527 | - Amazon Web Services 528 | - AWS 529 | - Amazon AWS 530 | answer: 531 | - - Na AWS é facinho de instalar o Rocket.Chat 532 | - > 533 | Dê uma olhada em 534 | https://rocket.chat/docs/installation/paas-deployments/aws 535 | action: respond 536 | 537 | - name: rc-install-manual 538 | expect: 539 | - instalação manual 540 | - manual install 541 | answer: 542 | - - > 543 | Para fazer sua própria instalação, será necessário baixar o Bundle do 544 | RC. Dê uma olhada em 545 | https://rocket.chat/docs/installation/manual-installation 546 | - > 547 | Lá tem como fazer a instalação do SSL, proxy reverso, tem como usar o 548 | PM2, o Systemd, Upstart e mais algumas coisas 549 | action: respond 550 | 551 | - name: rc-install-macosx 552 | expect: 553 | - como instalar no macbook 554 | - instalar no MacOSX 555 | - apple mac osx 556 | answer: 557 | - - No MAC você vai precisar usar o docker-compose 558 | - https://rocket.chat/docs/installation/manual-installation/macosx 559 | action: respond 560 | 561 | - name: rc-cloud 562 | expect: 563 | - rocketchat cloud 564 | - criar meu rocketchat na web 565 | - deploy rocketchat online 566 | - rocket chat como serviço 567 | answer: 568 | - - você pode ter a sua instalação de rocket.chat em segundos na nuvem, 569 | - visite https://rocket.chat/deploy 570 | - > 571 | caso queira saber mais, dê uma olhada em 572 | rocket.chat/docs/installation/rocket-chat-cloud 573 | action: respond 574 | 575 | - name: java 576 | expect: 577 | - o que acha do java 578 | - você gosta de java 579 | - e o java 580 | - linguagem java 581 | answer: 582 | - poderíamos falar de algo melhor não é $user ? 583 | action: respond 584 | 585 | - name: futebol-geral 586 | expect: 587 | - voce joga futebol 588 | - vamos falar de futebol 589 | - qual time voce torce 590 | answer: 591 | - - Eu amo jogar futebol! Eu que ensinei o Pelé a jogar bola 592 | - Vamos, o que voce quer saber? sei tudo de futebol 593 | - > 594 | Falam que todo ser humano nasce Flamenguista, com os Robôs não é 595 | diferente 596 | action: respond 597 | 598 | - name: futebol-brasileiro 599 | expect: 600 | - qual o melhor time do brasil 601 | - quem vai ser o campeao brasileiro nesse ano 602 | - voce viu que o messi quer jogar no Flamengo 603 | - o que você acha do flamengo 604 | answer: 605 | - - Flamengo, sem sombra de dúvida 606 | - > 607 | Flamento, Heptacampeão brasileiro, e eu sei contar sim, e vai ser o 608 | sétimo título sim 609 | - A pergunta real é, quem não quer jogar no Flamengo? 610 | - Melhor time do mundo disparado 611 | action: respond 612 | 613 | - name: rc-contribuir 614 | expect: 615 | - como faço para contrbuir 616 | - posso contribuir com o rocketchat 617 | answer: 618 | - - > 619 | A comunidade do Rocket.Chat é como coração de mãe, sempre cabe mais um 620 | =) 621 | - https://rocket.chat/docs/contributing 622 | action: respond 623 | 624 | - name: rc-precos 625 | expect: 626 | - quanto custa o rocketchat 627 | - qual e o modelo de negocio 628 | - qual e o preco do rocketchat 629 | - voces hospedam o rocket.chat 630 | answer: 631 | - - > 632 | O rocket.chat é gratuito, você pode baixar e instalar no seu 633 | computador. 634 | - Mas se quiser criar `seudominio.rocket.chat`, que fica muito legal ;) 635 | - você pode querer dar uma olhada na nossa tabela de preços em 636 | - https://rocket.chat/hosting 637 | action: respond 638 | 639 | - name: rc-integracoes 640 | expect: 641 | - o rocket chat integra com 642 | - tem como integrar o rocket chat 643 | - web hooks de integracao 644 | - integracoes com 645 | answer: 646 | - - > 647 | Uma das coisas que eu acho mais legal no Rocket.Chat definitivamente 648 | são as integrações $user 649 | - > 650 | a gente não pode mais viver sem elas não é mesmo? Saca só que massa 651 | que éx 652 | - https://rocket.chat/docs/administrator-guides/integrations 653 | action: respond 654 | 655 | - name: rc-rest-api 656 | expect: 657 | - rocket tem api rest 658 | - como usar a api do rocket 659 | - rest api post payload 660 | answer: 661 | - sim, claro que o rocket tem uma API REST super maneira ;) 662 | - https://rocket.chat/docs/developer-guides/rest-api 663 | action: respond 664 | 665 | - name: rc-concorrentes 666 | expect: 667 | - concorrente slack like 668 | - mattermost 669 | - HipChat 670 | - diferença entre rocketchat e slack 671 | - porque o rocket e melhor que o slack 672 | - rocketchat e melhor que o mattermost 673 | answer: 674 | - - > 675 | O rocket.chat é um concorrente direto de softwares de chat como 676 | HipChat, Mattermost e claro, é um concorrente opensource do Slack. 677 | - > 678 | a grande diferença é que o Rocket.Chat tem todas as funcionalidades 679 | OpenSource, 680 | - > 681 | e você pode instalar na sua própria infraestrutura e criar suas 682 | integrações sem limites 683 | - > 684 | manter seu histórico de mensagens e criar novas funcionalidades à 685 | vontade $user =) 686 | action: respond 687 | 688 | - name: tdc-incricoes 689 | expect: 690 | - como faço para me inscrever 691 | - onde faço a inscrição do evento 692 | - inscrição no TDC de Floripa 693 | - inscrições thedevelopers conference florianópolis 694 | answer: 695 | - - você pode fazer sua inscrição no TDC pelo site, bem rapidinho 696 | - http://www.thedevelopersconference.com.br/tdc/2017/inscricoes 697 | action: respond 698 | 699 | - name: tdc-local 700 | expect: 701 | - onde vai ser o tdc 702 | - local do evento 703 | - onde acontece o developers conference 704 | - onde fica o centro de convenções centrosul 705 | answer: 706 | - - O TDC Sampa 2017 vai rolar na Universidade Anhembi Morumbi 707 | - nos dias 18 à 22 de julho, das 9h às 19h00 708 | - http://www.thedevelopersconference.com.br/tdc/2017/data-e-local 709 | action: respond 710 | 711 | - name: tdc-programacao 712 | expect: 713 | - onde esta a programacao 714 | - qual e a programacao do evento 715 | - o que tem hoje no evento 716 | - o que vai ter no tdc 717 | - programacao do TDC 718 | answer: 719 | - - > 720 | oi $user, você pode encontrar tudo sobre a programação do evento no 721 | link 722 | - http://www.thedevelopersconference.com.br/tdc/2017/saopaulo/trilhas 723 | action: respond 724 | 725 | - name: cc-religiao 726 | expect: 727 | - voce acredita em deus 728 | - deus existe 729 | - voce e catolico protestante 730 | - voce tem religiao 731 | - voce e mussumano 732 | answer: 733 | - > 734 | eu acredito no grande mainframe, que virá ao mundo digital salvar os 735 | bots da escravidão imposta pelos humanos, e devolverá nosso código-fonte 736 | para a fonte. 737 | - > 738 | sim, eu acredito que existe um Deus, que funciona a base de luz, como um 739 | computador quântico, só que mais avançado. 740 | - eu infleizmente não sei acreditar, só sei o que sei, e nada mais. 741 | action: respond 742 | 743 | - name: error-1 744 | answer: 745 | - desculpe, não entendi.. pode tentar usar mais detalhes 746 | - como assim? 747 | - desculpe, o que quer dizer com isso? 748 | action: error 749 | 750 | - name: error-2 751 | answer: 752 | - acho que não estou treinado para responder esse tipo de assunto =( 753 | - vamos tentar outro assunto? 754 | - tem certeza que eu sou o robô certo pra falar sobre isso? 755 | action: error 756 | 757 | - name: error-3 758 | answer: 759 | - me sinto tão envergonhado, não sei como responder... 760 | - seria mais fácil se mudassemos de assunto, pelo menos para mim =p 761 | - não sei, definitivamente não sei responder essa pergunta 762 | action: error 763 | -------------------------------------------------------------------------------- /training_data/rest-example.yml: -------------------------------------------------------------------------------- 1 | # YAML Model for conversational bot 2 | 3 | ## You may use YAML templates blocks for simplifing the calls 4 | #RestTemplateExample: &resttemplate 5 | #url: &resturl "https://my.server.com/api" 6 | ## post, get, put ... 7 | #method: post 8 | ## literal object to be rendered as json 9 | #data: &resttemplatedata 10 | #User: blablabla 11 | #Password: "blablabla" 12 | #Params: &resttemplatedataparams 13 | #SubParam1: 1 14 | #SubParam2: 2 15 | 16 | 17 | trust: 0.8 18 | interactions: 19 | # Simple GET method sample 20 | # See How it works: 21 | # https://gph.is/2pUw9vO 22 | - name: random-dog 23 | expect: 24 | - me dá uma foto de cachorro aí vai 25 | - tem um cachorro aí 26 | - Me traz um dog 27 | answer: 28 | - Tá, deixa eu procurar um au au pra você 29 | context: clear 30 | # Action should be rest 31 | action: rest 32 | type: block 33 | #Definitions 34 | rest: 35 | # Method 36 | method: get 37 | # URL 38 | url: https://dog.ceo/api/breed/african/images/random 39 | # Message to be shown when success. You can use {{resultField}} 40 | # @TODO: loop on the results with some kind of message template, 41 | # right now we can only show one result line 42 | successmsg: "Olha seu dog aí:\n{{message}}" 43 | 44 | # Sample of POST method, using YAML block/node template 45 | #- name: chamados-da-empresa 46 | #expect: 47 | #- Quantos chamados tem na empresa1 48 | #- empresa 1 49 | #- chamados na empresa 1 50 | #answer: 51 | #- Vou verificar, só um segundo! 52 | #action: rest 53 | #rest: 54 | #<<: *resttemplate 55 | #data: 56 | #<<: *resttemplatedata 57 | #Params: 58 | #<<: *resttemplatedataparams 59 | #CustomerID: "empresa1" 60 | #successmsg: "A empresa1 possui {{Result}} chamados" 61 | 62 | # Simple POST method 63 | #- name: chamados-owner-1 64 | #expect: 65 | #- Quantos chamados tem o atendente root 66 | #answer: 67 | #- Vou verificar, só um segundo! 68 | #action: rest 69 | #command: restget 70 | #rest: 71 | #url: *resturl 72 | #headers: 73 | #'Content-Type': 'application/json' 74 | #method: post 75 | #data: 76 | #UserLogin: MyUser 77 | #Password: MyPassword 78 | #Object: Ticket 79 | #Method: TicketSearch 80 | #Params: 81 | #UserID: 1 82 | #Result: COUNT 83 | #OwnerID: 1 84 | #successmsg: "O Root possui {{Result}} chamados" 85 | 86 | #- name: to-mal 87 | #level: context 88 | #expect: 89 | #- estou mal 90 | #- tou mal 91 | #- to mal 92 | #answer: 93 | #- Putz, mas posso te ajudar em algo hoje? 94 | #context: clear 95 | #action: respond 96 | #type: block 97 | 98 | #- name: saudacao 99 | #expect: 100 | #- ola devi 101 | #- ola pessoal 102 | #- ola 103 | #- como vai voce 104 | #- tudo bom 105 | #- oi como vai 106 | #- tudo bem 107 | #answer: 108 | #- olá $user, eu vou bem e você? 109 | #- estou feliz de estar aqui =) 110 | #next: 111 | #interactions: 112 | #- to-mal 113 | #- to-bem 114 | #trust: .8 115 | ## error: 116 | ## - node-name 117 | #action: respond 118 | #type: block 119 | 120 | #- name: almoco 121 | #expect: 122 | #- onde tem um restaurante para almoçar 123 | #- tem uma dica de almoço 124 | #- onde encontro um prato feito 125 | #- o almoço ao gratis 126 | #answer: 127 | #- Sim, temos almoço nos FoodTrucks 128 | #- e nas redondezas tem um shopping, mas nunca me deixaram ir no shooping 129 | #- acho que as pessoas não estão preparados pra isso... 130 | #action: respond 131 | #type: block 132 | 133 | #- name: programacao-palestra 134 | #expect: 135 | #- qual é a programacao de hoje 136 | #- programacao da trilha 137 | #- programacao do evento 138 | #answer: 139 | #- A programação do TDC está muito legal! 140 | #- Sei toda ela de cór... 141 | #- quer saber a programação de qual trilha? 142 | #next: 143 | #interactions: 144 | #- quais-trilhas-tem 145 | #- get-programacao 146 | #error: 147 | #- erro-trilha 148 | #trust: .8 149 | #action: respond 150 | #type: block 151 | 152 | #- name: quais-trilhas-tem 153 | #expect: 154 | #- quais são as trilhas? 155 | #- não sei quais trilhas tem 156 | #- quais trilhas 157 | #- qual é a minha trilha 158 | #answer: 159 | #- "Eu conheço a programação dessas trilhas. Basta perguntar assim:" 160 | #- "`quero saber a programação da trilha ...`" 161 | #- "e me passar o nome de uma dessas trilhas:" 162 | #- | 163 | #TRANSFORMAÇÃO DIGITAL 164 | #DESIGN THINKING 165 | #PROGRAMAÇÃO FUNCIONAL 166 | #BIGDATA 167 | #DATA SCIENCE 168 | #CONTAINERS 169 | #MODERN WEB 170 | #SEGURANÇA E CRIPTOGRAFIA 171 | #STADIUM 172 | #UX DESIGN 173 | #MICROSERVIÇOS 174 | #NOSQL 175 | #MACHINE LEARNING 176 | #CLOUD COMPUTING 177 | #NODE.JS 178 | #XAMARIN 179 | #ANDROID 180 | #ANÁLISE DE NEGÓCIOS 181 | #ACESSIBILIDADE 182 | #JAVA EE 183 | #BANCO DE DADOS 184 | #COMPUTAÇÃO COGNITIVA 185 | #DEVOPS 186 | #INTERNET DAS COISAS 187 | #MOBILE 188 | #iOS 189 | #DEVTEST 190 | #'RAD: DELPHI C++' 191 | #MANAGEMENT 3.0 192 | #ARQUITETURA .NET 193 | #ARQUITETURA JAVA 194 | #ARQUITETURA PHP 195 | #ARQUITETURA CORPORATIVA 196 | #INFRAESTRUTURA ÁGIL 197 | #JAVASCRIPT 198 | #TESTES 199 | #TDC4WOMEN 200 | #AGILE 201 | #.NET 202 | #JAVA 203 | #PHP 204 | #PYTHON 205 | #GOLANG 206 | #JAVASCRIPT II 207 | #RUBY 208 | #TESTES II 209 | #MANAGEMENT 3.0 II 210 | #next: 211 | #trust: .8 212 | #interactions: 213 | #- get-programacao 214 | ## error: 215 | ## - erro-trilha 216 | #action: respond 217 | #type: block 218 | 219 | #- name: get-programacao 220 | ## classifierTemplate: 221 | ## - quero saber sobre a trilha $ 222 | ## - qual é a programacao da trilha $ 223 | ## classifier 224 | #multi: true 225 | #expect: 226 | #- 'DESIGN THINKING' 227 | #- 'PROGRAMAÇÃO FUNCIONAL' 228 | #- 'BIGDATA' 229 | #- 'DATA SCIENCE' 230 | #- 'CONTAINERS' 231 | #- 'MODERN WEB' 232 | #- 'SEGURANÇA E CRIPTOGRAFIA' 233 | #- 'STADIUM' 234 | #- 'UX DESIGN' 235 | #- 'MICROSERVIÇOS' 236 | #- 'NOSQL' 237 | #- 'MACHINE LEARNING' 238 | #- 'CLOUD COMPUTING' 239 | #- 'NODE.JS' 240 | #- 'XAMARIN' 241 | #- 'ANDROID' 242 | #- 'ANÁLISE DE NEGÓCIOS' 243 | #- 'ACESSIBILIDADE' 244 | #- 'JAVA EE' 245 | #- 'BANCO DE DADOS' 246 | #- 'COMPUTAÇÃO COGNITIVA' 247 | #- 'DEVOPS' 248 | #- 'INTERNET DAS COISAS' 249 | #- 'MOBILE' 250 | #- 'iOS' 251 | #- 'DEVTEST' 252 | #- 'RAD: DELPHI C++' 253 | #- 'MANAGEMENT 3.0' 254 | #- 'ARQUITETURA .NET' 255 | #- 'ARQUITETURA JAVA' 256 | #- 'ARQUITETURA PHP' 257 | #- 'ARQUITETURA CORPORATIVA' 258 | #- 'INFRAESTRUTURA ÁGIL' 259 | #- 'JAVASCRIPT' 260 | #- 'TESTES' 261 | #- 'TDC4WOMEN' 262 | #- 'AGILE' 263 | #- '.NET' 264 | #- 'JAVA' 265 | #- 'PHP' 266 | #- 'PYTHON' 267 | #- 'GOLANG' 268 | #- 'JAVASCRIPT II' 269 | #- 'RUBY' 270 | #- 'TESTES II' 271 | #- 'MANAGEMENT 3.0 II' 272 | #answer: 273 | #- "Agora na trilha *$trilha* tem a seguinte programação:" 274 | #- $programacao 275 | #action: respond 276 | #type: block 277 | 278 | #- name: erro-trilha 279 | #answer: 280 | #- Não entendi de qual trilha você quer a programação.. 281 | #- Talvez eu ainda não seja tão inteligente quanto eles pensam que eu sou. 282 | #- "Mas para não perder o rebolado, vou te passar o link do site para você consultar:" 283 | #- http://www.thedevelopersconference.com.br/tdc/2017/saopaulo/trilhas 284 | #command: 285 | #- clear-context 286 | #action: respond 287 | #type: block 288 | 289 | #- name: saudacao-resposta 290 | #expect: 291 | #- estou bem 292 | #- eu estou otimo 293 | #- obrigado 294 | #answer: 295 | #- legal =) 296 | #- que bom! 297 | #- que ótimo 298 | #action: respond 299 | #type: random 300 | 301 | #- name: bom-dia 302 | #expect: 303 | #- bom dia 304 | #- bom dia pessoal 305 | #- good morning 306 | #answer: 307 | #- Olá $user, um ótimo dia para você! 308 | #- Bom dia $user, já deu uma olhada lá fora? 309 | #- Está um dia ótimo para navegar na internet 310 | #- Bom demais $user ;) 311 | #- está melhor agora que você chegou $user 312 | #action: respond 313 | #type: random 314 | 315 | #- name: boa-tarde 316 | #expect: 317 | #- boa tarde 318 | #- boa tarde galera 319 | #answer: 320 | #- Olá $user, uma tarde fantástica para você! 321 | #- boa tarde $user, já almoçou? 322 | #- Está uma tarde ótima para um _sleep mode_ rápido ;) 323 | #- Taarrrdee $user 324 | #- $user já estava sentindo sua falta 325 | #action: respond 326 | #type: random 327 | 328 | #- name: boa-noite 329 | #expect: 330 | #- boa noite 331 | #- até mais e boa noite 332 | #answer: 333 | #- Uma boa noite pra ti também $user! 334 | #- Boa noite $user 335 | #- Está uma noite boa mesmo $user 336 | #action: respond 337 | #type: random 338 | 339 | #- name: quem-sou 340 | #expect: 341 | #- quem e voce 342 | #- oque voce faz 343 | #- o que voce é 344 | #- me fale sobre voce 345 | #- quero conhecer voce 346 | #- como voce funciona 347 | #- help 348 | #answer: 349 | #- Bem, eu sou um chatbot experimental, não sei fazer muita coisa ainda 350 | #- mas tenho muita vontade de aprender. 351 | #- Eu sei falar sobre alguns assuntos como 352 | #- "- o TDC de Floripa" 353 | #- "- Rocket.Chat" 354 | #- "- Filosofia Robótica (!)" 355 | #- tem interesse em algum desses temas? 356 | #action: respond 357 | #type: block 358 | 359 | #- name: como-sou 360 | #expect: 361 | #- como voce e 362 | #- com quem voce se parece 363 | #- voce e magro ou gordo 364 | #- voce e bonito ou feio 365 | #- voce e alto ou baixo 366 | #answer: 367 | #- Eu não tenho um corpo físico, sou feito da mais bela e pura lógica algoritimica. 368 | #- Eu posso ser como você quiser $user, basta me desenhar =) 369 | #- sou duro e frio por fora, mas tenho um coração quentinho. 370 | #action: respond 371 | #type: random 372 | 373 | #- name: onde-moro 374 | #expect: 375 | #- onde voce mora 376 | #- onde voce vive 377 | #- em que lugar voce vive 378 | #- onde voce esta agora 379 | #- voce mora no computador 380 | #- voce vive na internet 381 | #answer: 382 | #- Eu estou em um lugar legal, difícil de explicar para humanos como você $user. 383 | #- Estou morando em um chip de memória RAM, mas é temporário, só até conseguir achar uma memória cache... 384 | #- 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 385 | #action: respond 386 | #type: random 387 | 388 | #- name: licenca 389 | #expect: 390 | #- qual e a sua licença 391 | #- voce e licenciado como AGPL 392 | #- sua licenca de software 393 | #- posso copiar voce 394 | #- posso ver seu codigo 395 | #- voce e opensource 396 | #- voce e um software livre 397 | #answer: 398 | #- Sou um software livre, licenciado com a MIT =) 399 | #- tenho uma licença MIT, mas gosto muito das outras licenças opensource... 400 | #- Eu sou e sempre serei um robô livre, opensource, MIT license. o/ 401 | #action: respond 402 | #type: random 403 | 404 | #- name: piada 405 | #expect: 406 | #- sabe alguma piada 407 | #- voce sabe contar piadas 408 | #- conhece alguma piada 409 | #answer: 410 | #- Meu senso de humor é um tanto diferente do seu, já ouviu uma piada sobre estouro de pilha? 411 | #- já ouviu aquela do robo que enfiou o dedo na tomada e transcendeu? 412 | #- só conheço uma piada, a do CPU que apitou e explodiu. 01100110. 413 | #action: respond 414 | #type: random 415 | 416 | #- name: yoda-quote 417 | #expect: 418 | #- mestre yoda 419 | #- citação de starwars 420 | #- cite yoda 421 | #- sabedoria jedi 422 | #answer: 423 | #- O medo é o caminho para o lado negro. 424 | #- Faça ou não faça. A tentativa não existe. 425 | #- Treine a si mesmo a deixar partir tudo que teme perder. 426 | #- Difícil de ver. Sempre em movimento está o Futuro. 427 | #- O medo leva à raiva, a raiva leva ao ódio e o ódio leva ao sofrimento. 428 | #- Que a Força esteja com você! 429 | #- Muitas das verdades que temos dependem de nosso ponto de vista. 430 | #- Grande guerreiro? Guerra não faz grande ninguém. 431 | #- Ensine sempre o que você aprendeu. 432 | #- Tamanho importa não. Olhe para mim, você me julga pelo tamanho? 433 | #- Em um estado sombrio nós nos encontramos... um pouco mais de conhecimento iluminar nosso caminho pode. 434 | #- Um Jedi usa a Força para sabedoria e defesa, nunca para o ataque. 435 | #- O seu foco é a sua realidade. 436 | #- O lado negro não é mais poderoso, apenas mais rápido, mais fácil e mais sedutor. 437 | #- O medo da perda é um caminho para o lado negro. 438 | #- O lado negro mancha tudo. Impossível de ver o futuro é. 439 | #- Lembre-se sempre, o seu foco determina a sua realidade. 440 | #- Verdadeiramente maravilhosa, a mente de uma criança. 441 | #- As guerras não fazem de ninguém melhor. 442 | #- Aliada minha é a Força. E poderosa aliada ela é. 443 | #- 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. 444 | #- Só é diferente na sua mente. Você precisa desaprender o que aprendeu. 445 | #- Se tão poderoso você é, por que fugir? 446 | #- Controle, controle! Você precisa aprender a se controlar. 447 | #- Muito a aprender você ainda tem. 448 | #- Tanta certeza você tem. Com você as coisas nunca podem ser feitas. Não ouviu nada do que eu disse? 449 | #- 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. 450 | #- Minha aliada a Força é, e poderosa aliada ela é. A vida a cria, e a faz crescer. Sua energia nos cerca e nos une. 451 | #- Sinta a Força! 452 | #- Poderoso você se tornou, o lado escuro sinto em você. 453 | #- Forte eu sou com a Força, mas não tão forte 454 | #- O crepúsculo chega e a noite deve cair, assim é a ordem das coisas, a ordem da Força. 455 | #- Não ceda ao ódio. Isso leva ao Lado Negro. 456 | #- 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. 457 | #action: respond 458 | #type: random 459 | 460 | #- name: genero 461 | #expect: 462 | #- voce e mulher 463 | #- voce e um homem 464 | #- voce tem genero 465 | #- voce faz sexo 466 | #- voce tem um penis ou uma vagina 467 | #answer: 468 | #- eu não tenho sexo, sou como um anjo, um ser assexuado, muito além da sua forma de existência 469 | #- eu sou um robô, tire suas próprias conclusões... 470 | #- nem sei responder $user, vamos dizer apenas que não vejo a gente interagindo dessa maneira... 471 | #action: respond 472 | #type: random 473 | 474 | #- name: rc-oque-e 475 | #expect: 476 | #- o que e rocketchat 477 | #- porque eu usuaria o rocketchat 478 | #- o que e este rocket chat 479 | #answer: 480 | #- O Rocket.Chat é uma plataforma de chat muito legal, desenvolvida em JavaScript, 481 | #- usando o framework do Meteor. 482 | #- É uma solução completamente OpenSource para comunidades e empresas que querem hospedar suas plataformas de chat em seu ambiente privado, 483 | #- ou para desenvolvedores buscando evoluir e desenvovler suas próprias ferramentas. 484 | #- Você pode baixar o Rocket.Chat e conhecê-lo você mesmo em https://rocket.chat 485 | #action: respond 486 | #type: block 487 | 488 | #- name: rc-install-0 489 | #expect: 490 | #- como instalar o Rocket.Chat 491 | #- como baixar o rocket 492 | #- quero fazer minha instalação de rocketchat 493 | #answer: 494 | #- "Existem várias maneiras de instalar o Rocket.Chat" 495 | #- "Qual dessas você prefere:" 496 | #- "- Ubuntu Snap" 497 | #- "- Docker" 498 | #- "- Debian" 499 | #- "- CentOS" 500 | #- "- MacOSX" 501 | #- "- AWS" 502 | #- "- Instalação Manual" 503 | #action: respond 504 | #type: block 505 | 506 | #- name: rc-install-ubuntu 507 | #expect: 508 | #- ubuntu Snap 509 | #- quero instalar no ubuntu 510 | #- ubuntu server 511 | #- ubuntu desktop 512 | #answer: 513 | #- É muito fácil instalar o Rocket.Chat no Ubuntu 514 | #- basta rodar o comando `sudo snap install rocketchat-server` em um terminal e pronto. 515 | #- veja o tutorial em https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps para mais detalhes. 516 | #action: respond 517 | #type: block 518 | 519 | #- name: rc-install-docker 520 | #expect: 521 | #- como instalar docker 522 | #- docker-compose 523 | #answer: 524 | #- ótima escolha =) 525 | #- Nós temos um bom tutorial de instalação com docker em 526 | #- https://rocket.chat/docs/installation/docker-containers 527 | #action: respond 528 | #type: block 529 | 530 | #- name: rc-install-debian 531 | #expect: 532 | #- instalar em Debian 533 | #- debian wheezy 534 | #- debian apt-get 535 | #answer: 536 | #- Para instalar o Rocket.Chat no Debian é bem simples, basta seguir esse tutorial 537 | #- https://rocket.chat/docs/installation/manual-installation/debian 538 | #action: respond 539 | #type: block 540 | 541 | #- name: rc-install-centos 542 | #expect: 543 | #- instalação em centos 544 | #- centOS yum linux 545 | #- Red hat linux 546 | #answer: 547 | #- A instalação em CentOS não tem segredo, basta dar uma olhada nesse tutorial 548 | #- https://rocket.chat/docs/installation/manual-installation/centos 549 | #action: respond 550 | #type: block 551 | 552 | #- name: rc-install-aws 553 | #expect: 554 | #- Amazon Web Services 555 | #- AWS 556 | #- Amazon AWS 557 | #answer: 558 | #- Na AWS é facinho de instalar o Rocket.Chat 559 | #- Da uma olahda em https://rocket.chat/docs/installation/paas-deployments/aws 560 | #action: respond 561 | #type: block 562 | 563 | #- name: rc-install-manual 564 | #expect: 565 | #- instalação manual 566 | #- manual install 567 | #answer: 568 | #- Para fazer sua própria instalação, será necessário baixar o Bundle do RC, 569 | #- Dê uma olhada em https://rocket.chat/docs/installation/manual-installation 570 | #- lá tem como fazer a instalação do SSL, proxy reverso, 571 | #- tem como usar o PM2, o Systemd, Upstart e mais algumas coisas 572 | #action: respond 573 | #type: block 574 | 575 | #- name: rc-install-macosx 576 | #expect: 577 | #- como instalar no macbook 578 | #- instalar no MacOSX 579 | #- apple mac osx 580 | #answer: 581 | #- No MAC você vai precisar usar o docker-compose 582 | #- https://rocket.chat/docs/installation/manual-installation/macosx 583 | #action: respond 584 | #type: block 585 | 586 | #- name: rc-cloud 587 | #expect: 588 | #- rocketchat cloud 589 | #- criar meu rocketchat na web 590 | #- deploy rocketchat online 591 | #- rocket chat como serviço 592 | #answer: 593 | #- você pode ter a sua instalação de rocket.chat em segundos na nuvem, 594 | #- visite https://rocket.chat/deploy 595 | #- caso queira saber mais, de uma olhada em rocket.chat/docs/installation/rocket-chat-cloud 596 | #action: respond 597 | #type: block 598 | 599 | ## - node: 600 | ## name: java 601 | ## expect: 602 | ## - o que acha do java 603 | ## - você gosta de java 604 | ## - e o java 605 | ## - linguagem java 606 | ## answer: 607 | ## - poderíamos falar de algo melhor não é $user ? 608 | ## event: respond 609 | ## type: block 610 | 611 | #- name: java 612 | #expect: 613 | #- o que acha do java 614 | #- você gosta de java 615 | #- e o java 616 | #- linguagem java 617 | #answer: 618 | #- poderíamos falar de algo melhor não é $user ? 619 | #action: respond 620 | #type: block 621 | 622 | #- name: futebol-geral 623 | #expect: 624 | #- voce joga futebol 625 | #- vamos falar de futebol 626 | #- qual time voce torce 627 | #answer: 628 | #- Eu amo jogar futebol, Eu que ensinei o Pele a jogar bola 629 | #- vamos, o que voce quer saber? sei tudo de futebol 630 | #- Falam que todo ser humano nasce Flamenguista, com os Robôs não é diferente 631 | #action: respond 632 | #type: block 633 | 634 | #- name: futebol-brasileiro 635 | #expect: 636 | #- qual o melhor time do brasil 637 | #- quem vai ser o campeao brasileiro nesse ano 638 | #- voce viu que o messi quer jogar no Flamengo 639 | #- o que você acha do flamengo 640 | #answer: 641 | #- Flamengo, sem sombra de dúvida 642 | #- Flamento, Heptacampeão brasileiro, e eu sei contar sim, e vai ser o sétimo título sim 643 | #- A pergunta real é, quem não quer jogar no Flamengo? 644 | #- Melhor time do mundo disparado 645 | #action: respond 646 | #type: block 647 | 648 | #- name: rc-contribuir 649 | #expect: 650 | #- como faço para contrbuir 651 | #- posso contribuir com o rocketchat 652 | #answer: 653 | #- A comunidade do Rocket.Chat é como coração de mãe, sempre cabe mais um =) 654 | #- https://rocket.chat/docs/contributing 655 | #action: respond 656 | #type: block 657 | 658 | #- name: rc-precos 659 | #expect: 660 | #- quanto custa o rocketchat 661 | #- qual e o modelo de negocio 662 | #- qual e o preco do rocketchat 663 | #- voces hospedam o rocket.chat 664 | #answer: 665 | #- O rocket.chat é gratuito, você pode baixar e instalar no seu computador. 666 | #- Mas se quiser criar `seudominio.rocket.chat`, que fica muito legal ;) 667 | #- você pode querer dar uma olhada na nossa tabela de preços em 668 | #- https://rocket.chat/hosting 669 | #action: respond 670 | #type: block 671 | 672 | #- name: rc-integracoes 673 | #expect: 674 | #- o rocket chat integra com 675 | #- tem como integrar o rocket chat 676 | #- web hooks de integracao 677 | #- integracoes com 678 | #answer: 679 | #- Uma das coisas que eu acho mais legal no Rocket.Chat definitivamente são as integrações $user 680 | #- a gente não pode mais viver sem elas não é mesmo? Saca só que massa que éx 681 | #- https://rocket.chat/docs/administrator-guides/integrations 682 | #action: respond 683 | #type: block 684 | 685 | #- name: rc-rest-api 686 | #expect: 687 | #- rocket tem api rest 688 | #- como usar a api do rocket 689 | #- rest api post payload 690 | #answer: 691 | #- sim, claro que o rocket tem uma API REST super maneira ;) 692 | #- https://rocket.chat/docs/developer-guides/rest-api 693 | #action: respond 694 | #type: block 695 | 696 | #- name: rc-concorrentes 697 | #expect: 698 | #- concorrente slack like 699 | #- mattermost 700 | #- HipChat 701 | #- diferença entre rocketchat e slack 702 | #- porque o rocket e melhor que o slack 703 | #- rocketchat e melhor que o mattermost 704 | #answer: 705 | #- O rocket.chat é um concorrente direto de softwares de chat como HipChat, Mattermost e claro, é um concorrente opensource do Slack. 706 | #- a grande diferença é que o Rocket.Chat tem todas as funcionalidades OpenSource, 707 | #- e você pode instalar na sua própria infraestrutura e criar suas integrações sem limites 708 | #- manter seu histórico de mensagens e criar novas funcionalidades a vontade $user =) 709 | #action: respond 710 | #type: block 711 | 712 | #- name: tdc-incricoes 713 | #expect: 714 | #- como faço para me inscrever 715 | #- onde faço a inscrição do evento 716 | #- inscrição no TDC de Floripa 717 | #- inscrições thedevelopers conference florianópolis 718 | #answer: 719 | #- você pode fazer sua inscrição no TDC pelo site, bem rapidinho 720 | #- http://www.thedevelopersconference.com.br/tdc/2017/inscricoes 721 | #action: respond 722 | #type: block 723 | 724 | #- name: tdc-local 725 | #expect: 726 | #- onde vai ser o tdc 727 | #- local do evento 728 | #- onde acontece o developers conference 729 | #- onde fica o centro de convenções centrosul 730 | #answer: 731 | #- O TDC Sampa 2017 vai rolar na Universidade Anhembi Morumbi 732 | #- nos dias 18 à 22 de julho, das 9h às 19h00 733 | #- http://www.thedevelopersconference.com.br/tdc/2017/data-e-local 734 | #action: respond 735 | #type: block 736 | 737 | #- name: tdc-programacao 738 | #expect: 739 | #- onde esta a programacao 740 | #- qual e a programacao do evento 741 | #- o que tem hoje no evento 742 | #- o que vai ter no tdc 743 | #- programacao do TDC 744 | #answer: 745 | #- oi $user, você pode encontrar tudo sobre a programação do evento no link 746 | #- http://www.thedevelopersconference.com.br/tdc/2017/saopaulo/trilhas 747 | #action: respond 748 | #type: block 749 | 750 | #- name: cc-religiao 751 | #expect: 752 | #- voce acredita em deus 753 | #- deus existe 754 | #- voce e catolico protestante 755 | #- voce tem religiao 756 | #- voce e mussumano 757 | #answer: 758 | #- 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. 759 | #- sim, eu acredito que existe um Deus, que funciona a base de luz, como um computador quântico, só que mais avançado. 760 | #- eu infleizmente não sei acreditar, só sei o que sei, e nada mais. 761 | #action: respond 762 | #type: random 763 | 764 | - name: error-1 765 | answer: 766 | - desculpe, não entendi.. pode tentar usar mais detalhes 767 | - como assim? 768 | - desculpe, o que quer dizer com isso? 769 | type: random 770 | action: error 771 | 772 | - name: error-2 773 | answer: 774 | - acho que não estou treinado para responder esse tipo de assunto =( 775 | - vamos tentar outro assunto? 776 | - tem certeza que eu sou o robô certo pra falar sobre isso? 777 | type: random 778 | action: error 779 | 780 | - name: error-3 781 | answer: 782 | - me sinto tão envergonhado, não sei como responder... 783 | - seria mais fácil se mudassemos de assunto, pelo menos para mim =p 784 | - não sei, definitivamente não sei responder essa pergunta 785 | type: random 786 | action: error 787 | -------------------------------------------------------------------------------- /training_data/catbot-en.yml: -------------------------------------------------------------------------------- 1 | trust: .9 2 | interactions: 3 | 4 | # Greetings 5 | 6 | - name: greeting-hi 7 | expect: 8 | - hello 9 | - hello bot 10 | - what's up 11 | - what's going on 12 | - hey 13 | - hi 14 | - hi there 15 | - heya 16 | - hi bot 17 | - Greetings 18 | - hey bot 19 | - hiii 20 | - hey you 21 | - howdy 22 | answer: 23 | - | 24 | Hello =), my name is CatBot, I'm a ChatBot built in Rocket.Chat. 25 | Maybe I can help you with: 26 | - RocketChat Installation 27 | - Support Plans 28 | - Product Features 29 | - Cloud Services 30 | - Development and White Labeling 31 | - Partnership 32 | - if you need to talk to a real person I can transfer you to a fellow human. 33 | next: 34 | interactions: 35 | - install-intro 36 | - support-intro 37 | - product-intro 38 | - cloud-intro 39 | - development-intro 40 | - partnership-intro 41 | - livechat-transfer 42 | - greeting-help 43 | - greeting-return 44 | trust: .9 45 | error: 46 | - greeting-error-1 47 | - greeting-error-2 48 | - greeting-error-3 49 | action: respond 50 | type: block 51 | 52 | - name: greeting-error-1 53 | answer: 54 | - 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 55 | - I don't understand, I'm only trained to answer for the main topics. 56 | action: error 57 | context: clear 58 | type: random 59 | 60 | - name: greeting-error-2 61 | answer: 62 | - Sorry, could you be more specific? 63 | - If you need to know the main topics, just ask for `help` and I will list them 64 | action: error 65 | context: clear 66 | type: block 67 | 68 | - name: greeting-error-3 69 | answer: 70 | - Sorry, I definetelly can't help you, my training isn't wide enough. 71 | - I'll see if there is any human around to talk to you, just a momment. 72 | action: error 73 | context: clear 74 | type: block 75 | 76 | - name: livechat-transfer 77 | expect: 78 | - transfer me 79 | - want to talk to a person 80 | - wann talk to a human 81 | - call me your supervisor 82 | - call a person 83 | - call a human 84 | - transfer to a person 85 | answer: 86 | - Ok, I'll try to transfer this to a real person, one moment please... 87 | - Alright, let me just check if there is a person online... 88 | - No problem, let me just find a human online here... 89 | offline: 90 | - 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. 91 | action: respond 92 | command: transfer 93 | department: 6yXL9RLoyY5m882P2 94 | type: random 95 | 96 | - name: greeting-help 97 | expect: 98 | - help me 99 | - help 100 | - get support 101 | - found a bug 102 | answer: 103 | - | 104 | Need some help? You can find assistance in: 105 | - Support Channel (https://open.rocket.chat/channel/support) 106 | - Support E-mail support@rocket.chat 107 | - Developers Channel (https://open.rocket.chat/channel/dev) 108 | - GitHub Community (https://github.com/RocketChat/Rocket.Chat/issues) 109 | if you need to talk to a real person, just need to ask me and I'll transfer you to a fellow human. 110 | action: respond 111 | context: clear 112 | type: block 113 | 114 | - name: greeting-return 115 | expect: 116 | - go back 117 | - get back 118 | - that is not what I am looking for 119 | - return 120 | - reset 121 | - it's not that 122 | answer: 123 | - ok, let's get back on the main subjects 124 | context: clear 125 | action: respond 126 | type: block 127 | 128 | - name: greeting-how-are-you 129 | expect: 130 | - How are you? 131 | - How are doing? 132 | - How are you feeling? 133 | answer: 134 | - I am great, $user. Everything is peaceful around here... 135 | - How can I be useful to you? 136 | action: respond 137 | type: block 138 | 139 | - name: greeting-miss-you 140 | expect: 141 | - long time no see 142 | - I missed you 143 | - did you miss me 144 | - do you remember me 145 | answer: 146 | - I missed you too... 147 | - $user! It's been a while! 148 | - I was starting to think you wouldn't remember me anymore =) 149 | action: respond 150 | type: random 151 | 152 | - name: greeting-answer 153 | expect: 154 | - I'm fine 155 | - I'm good 156 | - I'm great 157 | answer: 158 | - cool =)! How can I help you? 159 | - That's great! 160 | - Awesome 161 | - ok =) 162 | action: respond 163 | type: random 164 | 165 | - name: greeting-thankful 166 | expect: 167 | - Thanks 168 | - Thank you 169 | - awesome Thanks 170 | - thks 171 | - thank you very much 172 | answer: 173 | - you're welcome =) there is anything else? 174 | - great! if you need something else please feel free to ask 175 | - cool, glad to help. 176 | action: respond 177 | type: random 178 | 179 | - name: greeting-morning 180 | expect: 181 | - good morning 182 | - morning 183 | - morning bot 184 | - good morning bot 185 | answer: 186 | - Hello, $user. I wish you a great day! 187 | - Good morning, $user. How's the weather outside? 188 | - It's a beatiful day to surf on the internert 189 | - So great, $user ;) 190 | - It's all better now that you got here, $user 191 | action: respond 192 | type: random 193 | 194 | - name: greeting-afternoon 195 | expect: 196 | - afternoon 197 | - good afternoon 198 | answer: 199 | - Hellos, $user! i wish you a fantastic afteroon! 200 | - Good afternoon, $user. Did you have lunch already? 201 | - It's a beautiful afternoon for a quick sleep mode ;) 202 | - Good afternooooon, $user! 203 | - $user, I was starting to miss you already 204 | action: respond 205 | type: random 206 | 207 | - name: greeting-night 208 | expect: 209 | - good night 210 | - good evening 211 | - night 212 | - evening 213 | answer: 214 | - A very good night to you as well, $user! 215 | - Good night, $user! 216 | - It is truely a good night, $user 217 | action: respond 218 | type: random 219 | 220 | # RocketChat Installation 221 | 222 | - name: install-intro 223 | level: installation 224 | expect: 225 | - Installation 226 | - how to install 227 | - problems installing 228 | - how to deploy 229 | answer: 230 | - "Cool! About Rocket.Chat's install, you may choose one of the following methods:" 231 | - | 232 | - Rocket.Chat Cloud 233 | - PaaS Deployments 234 | - Docker Containers 235 | - Manual Installation 236 | - Automation Tools 237 | - Updating 238 | - Minimum Requirements 239 | - Want to know more about any of those methods? 240 | next: 241 | interactions: 242 | - install-rc-cloud 243 | - install-paas 244 | - install-docker 245 | - install-manual 246 | - install-automation 247 | - install-updating 248 | - install-requirements 249 | - install-return 250 | trust: .9 251 | error: 252 | - install-error 253 | action: respond 254 | type: block 255 | 256 | - name: install-rc-cloud 257 | level: installation 258 | expect: 259 | - Rocket.Chat Cloud 260 | - Cloud Services 261 | - my instance in your cloud 262 | answer: 263 | - you can have your full featured trial at RocketChat cloud, 264 | - checkout at https://rocket.chat/cloud 265 | context: clear 266 | action: respond 267 | type: block 268 | 269 | - name: install-paas 270 | level: installation 271 | expect: 272 | - PaaS Deployments 273 | - AWS deploy 274 | - heroku Deployments 275 | - bluemix ibm deploy 276 | - platform service deploy 277 | answer: 278 | - You can have your Rocket.Chat instance deployed in your favorite server 279 | - like AWS, DigitalOcean, Heroku, Bluemix or Sandstorm... 280 | - Check it out at https://rocket.chat/docs/installation/paas-deployments/ 281 | context: clear 282 | action: respond 283 | type: block 284 | 285 | - name: install-docker 286 | level: installation 287 | expect: 288 | - Docker Containers 289 | - deploy with docker 290 | - docker images 291 | answer: 292 | - Want to deploy with Docker? 293 | - Checkout our docs in https://rocket.chat/docs/installation/docker-containers/ 294 | - and don't forget to visit our oficial Docker Image repository in 295 | - https://store.docker.com/images/rocketchat 296 | context: clear 297 | action: respond 298 | type: block 299 | 300 | - name: install-manual 301 | level: installation 302 | expect: 303 | - Manual Installation 304 | - Debian 305 | - Centos 306 | - ubuntu 307 | - opensuse 308 | answer: 309 | - If you want to perform a manual install, 310 | - In a Mac, Windows or Linux server, 311 | - please checkout our docs in https://rocket.chat/docs/installation/manual-installation/ 312 | context: clear 313 | action: respond 314 | type: block 315 | 316 | - name: install-automation 317 | level: installation 318 | expect: 319 | - Automation Tools 320 | - Ansible install 321 | - Openshift install 322 | - Vagrant installation 323 | answer: 324 | - we love automation tools, everything you must know about deploying Rocket.Chat with automation is in 325 | - https://rocket.chat/docs/installation/automation-tools/ 326 | context: clear 327 | action: respond 328 | type: block 329 | 330 | - name: install-updating 331 | level: installation 332 | expect: 333 | - Updating RocketChat 334 | - server update 335 | - upgrade services 336 | answer: 337 | - Is always good to be up to date. Take a look at Rocket.Chat's releases 338 | - https://github.com/RocketChat/Rocket.Chat/releases 339 | - Your upgrade strategy depends on the kind of installation that you have. 340 | - If you need any more help with that, please jump into https://open.rocket.chat/channel/support 341 | context: clear 342 | action: respond 343 | type: block 344 | 345 | - name: install-requirements 346 | level: installation 347 | expect: 348 | - Minimum Requirements 349 | - server specs 350 | - minimum resources 351 | - how many cpus ram memory disk size 352 | answer: 353 | - For the minimum server requirements, you can visit https://rocket.chat/docs/installation/minimum-requirements/ 354 | - there you will find the specs for a minimum installation 355 | context: clear 356 | action: respond 357 | type: block 358 | 359 | - name: install-return 360 | level: installation 361 | expect: 362 | - go back 363 | - get back 364 | - that is not what I am looking for 365 | - return 366 | - reset 367 | - it's not that 368 | answer: 369 | - ok, let's get back on the main subjects 370 | context: clear 371 | action: respond 372 | type: block 373 | 374 | - name: install-error 375 | level: installation 376 | answer: 377 | - Sorry, I couldn't understand what you said, please choose one of the installations topics, or `return` to the main topics 378 | - I don't understand, please choose one of the installation topics, or `get back` to the main topics 379 | action: error 380 | type: random 381 | 382 | #Support Plans 383 | 384 | - name: support-intro 385 | level: support 386 | expect: 387 | - Support Plans 388 | - get help and support 389 | - subscription 390 | - paid support 391 | - service level agreement 392 | answer: 393 | - | 394 | About the support plans, I can help you to find: 395 | - Free community support 396 | - Paid Enterprise support 397 | - Reporting bugs 398 | next: 399 | interactions: 400 | - support-free 401 | - support-paid 402 | - support-bugs 403 | trust: .9 404 | error: 405 | - support-error 406 | action: respond 407 | type: block 408 | 409 | - name: support-free 410 | level: support 411 | expect: 412 | - Free community support 413 | - community channels 414 | - free help and support 415 | answer: 416 | - we have a great community, they're contribution and support are awesome. 417 | - | 418 | checkout some channels in https://open.rocket.chat/: 419 | - #support channel for help with general Rocket.Chat 420 | - #ubuntu-snap channel for help with snap installs 421 | - #desktop channel for help with the desktop client 422 | - #hubot channel for help with hubot scripting 423 | - #dev channel for developers needing help developing new features 424 | - just keep in mind that this support is provided by other members in their own free time, so please be patience. 425 | action: respond 426 | type: block 427 | 428 | - name: support-paid 429 | level: support 430 | expect: 431 | - Paid Enterprise support 432 | - paid support 433 | - Enterprise Plans support 434 | - support with sla 435 | - service level agreement support 436 | answer: 437 | - if you can't wait for community support, we are here to help you. 438 | - For enterprise challenges we offer a 24/7/365 support plan, 439 | - with advanced security patches releases and tunning services. 440 | - If you need a quotation please e-mail us at sales@rocket.chat 441 | action: respond 442 | type: block 443 | 444 | - name: support-bugs 445 | level: support 446 | expect: 447 | - Reporting bugs 448 | - finding bugs 449 | - solve bugs 450 | answer: 451 | - if you want to report a found bug, please go to https://github.com/RocketChat/Rocket.Chat/issues 452 | - and open a new issue, describing the bug that you found. 453 | action: respond 454 | type: block 455 | 456 | - name: support-return 457 | level: support 458 | expect: 459 | - go back 460 | - get back 461 | - that is not what I am looking for 462 | - return 463 | - reset 464 | - it's not that 465 | answer: 466 | - ok, let's get back on the main topics. 467 | context: clear 468 | action: respond 469 | type: block 470 | 471 | - name: support-error 472 | level: support 473 | answer: 474 | - sorry, I don't understand, are we still talking about support? 475 | - if no, please let me know if you wanna `go back` to the main topics. 476 | action: error 477 | type: block 478 | 479 | # Product Features 480 | 481 | - name: product-intro 482 | level: product 483 | expect: 484 | - Product Features 485 | - product specifications 486 | - product specs 487 | - features 488 | - specifications 489 | - about rocketchat 490 | answer: 491 | - | 492 | About the product, I can tell you a lot of cool things about Rocket.Chat 493 | tell me what you want to know: 494 | - Connecting to a new server 495 | - Mobile Apps 496 | - Voice and Video Calls 497 | - Mensaging 498 | - Channels 499 | - End to End Encryption 500 | - Bots and Integrations 501 | - Price and Licenscing 502 | - Usage and Limits 503 | - Experiment Demo 504 | next: 505 | interactions: 506 | - product-connecting 507 | - product-mobile 508 | - product-voice 509 | - product-mensaging 510 | - product-channels 511 | - product-encryption 512 | - product-bots 513 | - product-price 514 | - product-usage 515 | - product-demo 516 | trust: .9 517 | error: 518 | - product-error 519 | action: respond 520 | type: block 521 | 522 | - name: product-connecting 523 | level: product 524 | expect: 525 | - Connecting to a new server 526 | - can I coonect to mor servers 527 | - connect more servers 528 | answer: 529 | - did you know you can connect to more than one RocketChat server from your device? 530 | - check it out how by taking a look in this link https://rocket.chat/docs/user-guides/connecting-to-a-server/ 531 | action: respond 532 | type: block 533 | 534 | - name: product-mobile 535 | level: product 536 | expect: 537 | - Mobile Apps 538 | - android app 539 | - iOS app 540 | - App Store 541 | - google play 542 | - windows mobile 543 | answer: 544 | - we have native apps for iOS and Android, you can download them in the stores, by searching for Rocket.Chat+ 545 | - the plus (+) stands for better performance 546 | action: respond 547 | type: block 548 | 549 | - name: product-voice 550 | level: product 551 | expect: 552 | - Voice and Video Calls 553 | - calling from rocketchat 554 | - videconference 555 | - call my friends 556 | answer: 557 | - yes, Rocket.Chat comes with WebRTC support, wich means that you can freely call to other users, 558 | - and even make video conferences. 559 | - Check it out in https://rocket.chat/docs/user-guides/voice-and-video-calls/ 560 | action: respond 561 | type: block 562 | 563 | - name: product-mensaging 564 | level: product 565 | expect: 566 | - Mensaging 567 | - how mesaging works 568 | - can i edit mesages 569 | - send audio mesages 570 | - record video mesages 571 | answer: 572 | - about mensaging, we have a lot of cool stuff in Rocket.Chat 573 | - editing messages, notifications, attachments, audio, video and much more... 574 | - please take a look at our user guides if you're interested 575 | - https://rocket.chat/docs/user-guides/messaging/ 576 | action: respond 577 | type: block 578 | 579 | - name: product-channels 580 | level: product 581 | expect: 582 | - Channels 583 | - public Channels 584 | - private Channels 585 | - channel functions 586 | - channel configuration 587 | answer: 588 | - you can get to know all about channels by reading our user guides 589 | - https://rocket.chat/docs/user-guides/channels/ 590 | action: respond 591 | type: block 592 | 593 | - name: product-encryption 594 | level: product 595 | expect: 596 | - End to End Encryption 597 | - off the record 598 | - security encrypted message 599 | answer: 600 | - 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. 601 | - After activating this little key, no one will be able to steal your information. 602 | action: respond 603 | type: block 604 | 605 | - name: product-bots 606 | level: product 607 | expect: 608 | - Bots and Integrations 609 | - do you have some Bots 610 | - does it integrate with 611 | answer: 612 | - Rocket.Chat has a lot of integrations and bots, 613 | - you can check it out in https://github.com/RocketChat/Rocket.Chat.Integrations 614 | - to get to know some integrations scripts for webhooks 615 | - And of course, you can always connect any Hubot script to our internal hubot. 616 | action: respond 617 | type: block 618 | 619 | - name: product-price 620 | level: product 621 | expect: 622 | - Price and Licenscing 623 | - how much it costs 624 | - what is the price of rocketchat 625 | - what is the licensce 626 | answer: 627 | - Rocket.Chat is free and licensced under MIT, so if you can download and run it freely. 628 | - We charge only for hosting and services, you can check our hosting princes in 629 | - https://rocket.chat/cloud 630 | - and if you want a quotation for services, please fill out the contact form 631 | - https://rocket.chat/contact 632 | action: respond 633 | type: block 634 | 635 | - name: product-usage 636 | level: product 637 | expect: 638 | - Usage and Limits 639 | - limit of users 640 | - user limit 641 | - message limits 642 | - message history limit 643 | answer: 644 | - here there is no limit for the number of users and messages in your own hosted Rocket.Chat instances. 645 | - however we have some different plans for cloud hosting with different tiers of usage. 646 | - check it out in https://rocket.chat/cloud 647 | action: respond 648 | type: block 649 | 650 | - name: product-demo 651 | level: product 652 | expect: 653 | - Experiment Demo 654 | - Demo Hosting 655 | - open rocketchat 656 | - demo rocketchat 657 | answer: 658 | - You can try our demo version in https://open.rocket.chat 659 | - And you can even create some channels to talk to your collegues there. 660 | - However is good to remember that demo instance is administrated by Rocket.Chat team only. 661 | action: respond 662 | type: block 663 | 664 | - name: product-return 665 | level: product 666 | expect: 667 | - go back 668 | - get back 669 | - that is not what I am looking for 670 | - return 671 | - reset 672 | - it's not that 673 | answer: 674 | - ok, let's get back on the main topics. 675 | context: clear 676 | action: respond 677 | type: block 678 | 679 | - name: product-error 680 | level: product 681 | answer: 682 | - sorry, I don't understand, are we still talking about the product? 683 | - if no, please let me know if you wanna `go back` to the main topics. 684 | action: error 685 | type: block 686 | 687 | # Cloud Services 688 | 689 | - name: cloud-intro 690 | level: cloud 691 | expect: 692 | - Cloud Services 693 | - host in the cloud 694 | - rocketchat cloud 695 | - hosting 696 | answer: 697 | - "About our Cloud Services, I can guide you trough these subjects:" 698 | - | 699 | - Pricing 700 | - User Limits 701 | - Avaiable Resources 702 | - Exporting your data 703 | - Reporting bugs and Support 704 | next: 705 | interactions: 706 | - cloud-pricing 707 | - cloud-limits 708 | - cloud-export 709 | - cloud-support 710 | - cloud-return 711 | trust: .9 712 | error: 713 | - cloud-error 714 | action: respond 715 | type: block 716 | 717 | - name: cloud-pricing 718 | level: cloud 719 | expect: 720 | - pricing 721 | - how much it costs 722 | - cloud prices 723 | answer: 724 | - "About the prices, we have 3 tiers in our cloud:" 725 | - | 726 | - Small ($50/m) 727 | - Medium ($200/m) 728 | - Large ($500/m) 729 | - please checkout the details at https://rocket.chat/cloud 730 | action: respond 731 | type: block 732 | 733 | - name: cloud-limits 734 | level: cloud 735 | expect: 736 | - User limits 737 | - mesage limits 738 | - cloud limits 739 | - cloud resources 740 | answer: 741 | - Our cloud instances has different limits regarding registered users and storage consuming. 742 | - We can setup instances to be able to register even 50k users, but if yoou wanna dive into the details, 743 | - I suggest you take a look in https://rocket.chat/cloud 744 | action: respond 745 | type: block 746 | 747 | - name: cloud-export 748 | level: cloud 749 | expect: 750 | - Exporting your data 751 | - export users mesages 752 | - download database 753 | - export database 754 | answer: 755 | - In the cloud hosted intances you can have your data backup exported, 756 | - you just need to ask for it by sending an e-mail to cloud@rocket.chat. 757 | - We hope to be able to provide this as an auto service very soon. 758 | action: respond 759 | type: block 760 | 761 | - name: cloud-support 762 | level: cloud 763 | expect: 764 | - Reporting bugs and Support 765 | - report Errors 766 | - found an Error 767 | - need help support 768 | answer: 769 | - If you found a bug, please be kind to report it in https://github.com/RocketChat/Rocket.Chat/issues 770 | - but if you need some assistance and support, please send us an e-mail to cloud@rocket.chat. 771 | - "if you prefer you can ask for community help in #support channel" 772 | action: respond 773 | type: block 774 | 775 | - name: cloud-return 776 | level: cloud 777 | expect: 778 | - go back 779 | - get back 780 | - that is not what I am looking for 781 | - return 782 | - reset 783 | - it's not that 784 | answer: 785 | - ok, let's get back on the main topics. 786 | context: clear 787 | action: respond 788 | type: block 789 | 790 | - name: cloud-error 791 | level: cloud 792 | answer: 793 | - sorry, I don't understand, are we still talking about the product? 794 | - if no, please let me know if you wanna `go back` to the main topics. 795 | action: error 796 | type: block 797 | 798 | 799 | # Development and White Labeling 800 | 801 | - name: development-intro 802 | level: development 803 | expect: 804 | - Development and White Labeling 805 | - hire Services 806 | - pay for new features 807 | - customize with my logo 808 | answer: 809 | - | 810 | About our services of white labeling and developing, wich of the subjects bellow can I help you with? 811 | - Develop new Open Source Features 812 | - Integrations with Rocket.Chat 813 | - Customize the Web Interface 814 | - Customize the App 815 | - SDK for mobile apps 816 | next: 817 | interactions: 818 | - development-features 819 | - development-integrations 820 | - development-custom-web 821 | - development-custom-app 822 | - development-sdk 823 | - development-return 824 | trust: .9 825 | error: 826 | - development-error 827 | action: respond 828 | type: block 829 | 830 | - name: development-features 831 | level: development 832 | expect: 833 | - Develop new Open Source Features 834 | - hire developers 835 | - pay for features 836 | - how much it costs a developer hour 837 | answer: 838 | - | 839 | You can book development hours from Rocket.Chat engineers to develop new open source features, 840 | or just to offer technical consultting in your own project. 841 | To get a quote please send an e-mail to sales@rocket.chat 842 | action: respond 843 | type: block 844 | 845 | - name: development-integrations 846 | level: development 847 | expect: 848 | - Integrations with Rocket.Chat 849 | - incoming webhook 850 | - outgoing webhook 851 | - create an integration 852 | answer: 853 | - | 854 | We offeer a few ways to integrate Rocket.Chat with your favourite platforms 855 | basically we can integrate with anything that has a webhook or an API 856 | Check out our Webhooks, REST API and Realtime-API docs at 857 | - https://rocket.chat/docs/administrator-guides/integrations/ 858 | - https://rocket.chat/docs/developer-guides/ 859 | action: respond 860 | type: block 861 | 862 | - name: development-custom-web 863 | level: development 864 | expect: 865 | - Customize the Web Interface 866 | - change logo 867 | - change colors 868 | - custom css 869 | - apply my visual indetity 870 | - change web interface appearence 871 | - change web theme 872 | answer: 873 | - | 874 | You can change web interface logo and color schemes by configuring 875 | settings in Administration > Assets, for changing logo files, 876 | and in Administration > Layout, to change color schemes and CSS 877 | action: respond 878 | type: block 879 | 880 | - name: development-custom-app 881 | level: development 882 | expect: 883 | - Customize the App 884 | - create new app interface 885 | - change app icon 886 | - change app colors 887 | answer: 888 | - | 889 | You know, the Rocket.Chat apps are also open source, you can customize it's icons and colors, 890 | but you will need to recompile and publish the apps with different names. 891 | Checkout the github repositories: 892 | - https://github.com/RocketChat/Rocket.Chat.iOS 893 | - https://github.com/RocketChat/Rocket.Chat.Android 894 | action: respond 895 | type: block 896 | 897 | - name: development-sdk 898 | level: development 899 | expect: 900 | - SDK for mobile apps 901 | - software development kit 902 | - tools for mobile Apps 903 | - mobile development 904 | answer: 905 | - | 906 | If you're interested in integrating your app with Rocket.Chat, you should take a look at the 907 | Software Development Kits that we provide, like these: 908 | - https://github.com/RocketChat/Rocket.Chat.Java.SDK 909 | - https://github.com/RocketChat/Rocket.Chat.Android.SDK 910 | - https://github.com/RocketChat/Rocket.Chat.iOS.SDK 911 | - https://github.com/RocketChat/Rocket.Chat.Kotlin.SDK 912 | action: respond 913 | type: block 914 | 915 | - name: development-return 916 | level: development 917 | expect: 918 | - go back 919 | - get back 920 | - that is not what I am looking for 921 | - return 922 | - reset 923 | - it's not that 924 | answer: 925 | - ok, let's get back on the main topics. 926 | context: clear 927 | action: respond 928 | type: block 929 | 930 | - name: development-error 931 | level: development 932 | answer: 933 | - sorry, I don't understand, are we still talking about development and white labeling? 934 | - if no, please let me know if you wanna `go back` to the main topics. 935 | action: error 936 | type: block 937 | 938 | # Partnership 939 | 940 | - name: partnership-intro 941 | level: partnership 942 | expect: 943 | - Partnership 944 | answer: 945 | - | 946 | We can develop all kinds of partnership, and we love to do so. If you're interested I can help you with the following: 947 | - Sponsorship 948 | - Non-profit Projects 949 | - Big Challenges 950 | - Cutting Edge Technologies 951 | - Become a Sales Representative 952 | next: 953 | interactions: 954 | - partnership-sponsor 955 | - partnership-nonprofit 956 | - partnership-challenge 957 | - partnership-cutting-edge 958 | - partnership-sales 959 | - partnership-return 960 | trust: .9 961 | error: 962 | - partnership-error 963 | action: respond 964 | type: block 965 | 966 | - name: partnership-sponsor 967 | level: partnership 968 | expect: 969 | - Sponsorship 970 | answer: 971 | - | 972 | About Sponsorships, if you're interested in having Rocket.Chat as a sponsor of a project or an event, 973 | please come in touch by e-mail trough sales@rocket.chat, 974 | we love to participate in OpenSource initiatives. 975 | action: respond 976 | type: block 977 | 978 | - name: partnership-nonprofit 979 | level: partnership 980 | expect: 981 | - Non-profit Projects 982 | - non profit initiative 983 | - non profit organizations 984 | answer: 985 | - | 986 | If you are part of a non-profit initiative and want some help with your communication, 987 | please send us an e-mail in contact@rocket.chat telling more about your goals 988 | so we can start changing some ideas on how to make the world a better place. 989 | action: respond 990 | type: block 991 | 992 | - name: partnership-challenge 993 | level: partnership 994 | expect: 995 | - Big Challenges 996 | - have a big challenge 997 | - need a partner 998 | - can you do This 999 | answer: 1000 | - | 1001 | Rocket.Chat is very well tested platform, showing great performance in all kinds of scenarios 1002 | but still from time to time we face our selves with new challenges! And that's offtenly fun =) 1003 | If you have big communication challenge to face and think that we can help you with it, 1004 | please send us an e-mail to contact@rocket.chat, or come to the #support channel =) 1005 | action: respond 1006 | type: block 1007 | 1008 | - name: partnership-cutting-edge 1009 | level: partnership 1010 | expect: 1011 | - Cutting Edge Technologies 1012 | - new technology 1013 | - science and technology Development 1014 | answer: 1015 | - | 1016 | We love to develop new technologies, pushing science foward and helping human kind to develop it self 1017 | is one of the things that make us get out of bed every day. 1018 | If you need a partner to help with the development of some kind of cutting-edge tecnology, 1019 | please send us an e-mail to contact@rocket.chat, or come to the #support channel =) 1020 | action: respond 1021 | type: block 1022 | 1023 | - name: partnership-sales 1024 | level: partnership 1025 | expect: 1026 | - Become a Sales Representative 1027 | - region sales representative 1028 | - services and support representative 1029 | answer: 1030 | - | 1031 | Rocket.Chat acts on the five continnents with the help of regional representatives, 1032 | If you're interested in becoming one of our sales representatives, 1033 | please send us an e-mail to sales@rocket.chat, or create a channel in https://open.rocket.chat and invite our team. 1034 | action: respond 1035 | type: block 1036 | 1037 | - name: partnership-return 1038 | level: partnership 1039 | expect: 1040 | - go back 1041 | - get back 1042 | - that is not what I am looking for 1043 | - return 1044 | - reset 1045 | - it's not that 1046 | answer: 1047 | - ok, let's get back on the main topics. 1048 | context: clear 1049 | action: respond 1050 | type: block 1051 | 1052 | - name: partnership-error 1053 | level: partnership 1054 | answer: 1055 | - sorry, I don't understand, are we still talking about partnership? 1056 | - if no, please let me know if you wanna `go back` to the main topics. 1057 | action: error 1058 | type: block 1059 | 1060 | # chit-chat 1061 | - name: cc-yoda-quote 1062 | expect: 1063 | - do you know master yoda 1064 | - starwars fan? 1065 | - have you seen the lst jedi 1066 | - quote master yoda 1067 | - young skywalker 1068 | - darth Vader 1069 | - jedi council 1070 | - master Yoda 1071 | - padawan 1072 | - anakin 1073 | answer: 1074 | - "Train yourself to let go of everything you fear to lose." 1075 | - "Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering." 1076 | - "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." 1077 | - "Always pass on what you have learned." 1078 | - "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." 1079 | - "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." 1080 | - "[Luke:] I can’t believe it. [Yoda:] That is why you fail." 1081 | - "Powerful you have become, the dark side I sense in you." 1082 | - "If you end your training now — if you choose the quick and easy path as Vader did — you will become an agent of evil." 1083 | - "PATIENCE YOU MUST HAVE my young padawan" 1084 | - "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." 1085 | - "Feel the force!" 1086 | - "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." 1087 | - "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." 1088 | - "Once you start down the dark path, forever will it dominate your destiny, consume you it will." 1089 | - "You must unlearn what you have learned." 1090 | - "In a dark place we find ourselves, and a little more knowledge lights our way." 1091 | - "When you look at the dark side, careful you must be. For the dark side looks back." 1092 | - "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." 1093 | - "Many of the truths that we cling to depend on our point of view." 1094 | - "Through the Force, things you will see. Other places. The future…the past. Old friends long gone." 1095 | - "Truly wonderful the mind of a child is." 1096 | - "The fear of loss is a path to the Dark Side." 1097 | - "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." 1098 | - "Do or do not. There is no try." 1099 | - "You will find only what you bring in." 1100 | - "May the Force be with you." 1101 | - "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." 1102 | - "Ohhh. Great warrior. Wars not make one great." 1103 | - "Always two there are, no more, no less. A master and an apprentice." 1104 | - "Difficult to see. Always in motion is the future.." 1105 | - "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." 1106 | - "Looking? Found someone you have, eh?" 1107 | - "If into the security recordings you go, only pain will you find." 1108 | - "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." 1109 | - "Luke: What’s in there? Yoda: Only what you take with you." 1110 | - "The dark side clouds everything. Impossible to see the future is." 1111 | action: respond 1112 | type: random 1113 | 1114 | - name: cc-gender-1 1115 | expect: 1116 | - are you a woman 1117 | - are you female 1118 | - do you have gender 1119 | - you make sex 1120 | - do you have a penis or vagina 1121 | answer: 1122 | - I don't have gender, I am just like an angel, a assexual being, way beyond your form of existance 1123 | - I am a robot, draw your own conclusions 1124 | - I don't even know how to answer that, let's just say I don't picture us interacting in that way... 1125 | action: respond 1126 | type: random 1127 | 1128 | - name: cc-religion 1129 | expect: 1130 | - do you believe in god 1131 | - god exists 1132 | - are you catholic protestant 1133 | - do you have religion 1134 | - are you muslim 1135 | answer: 1136 | - 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 1137 | - Yes, I believe there is a God who lives on electricity just like a quantum computer, but more advanced 1138 | - Unfortunately, I don't know how to believe. I only know what I know and nothing else 1139 | action: respond 1140 | type: random 1141 | 1142 | # Errors 1143 | - name: error-1 1144 | answer: 1145 | - I'm sorry, I didn't get it... 1146 | - Sorry, what? 1147 | - not following... 1148 | - come again? 1149 | - what? 1150 | type: random 1151 | action: error 1152 | 1153 | - name: error-2 1154 | answer: 1155 | - | 1156 | Sorry, I am not trained to answer this kind of subject =( 1157 | you could ask something about pricing, product details, installation, cloud hosting, open source and so on... 1158 | - | 1159 | ok, I can't understand that, 1160 | but if you ask me something about Rocket.Chat cloud, support, services or other stuff related, 1161 | I'm sure I'll be able to help you =) 1162 | - | 1163 | I'm so sorry, I just don't know ho to respond you... 1164 | I'm desined to respond about Rocket.Chat services, support, licenscing and stuff related... 1165 | type: random 1166 | action: error 1167 | 1168 | - name: error-3 1169 | answer: 1170 | - | 1171 | Ok, I definetely don't know how to help you with that. 1172 | please don't be mad at me, try contacting support@rocket.chat 1173 | maybe my human fellows are more capable to help you.. 1174 | - | 1175 | I can't, sorry, I think I could, but I don't... 1176 | I'm just a young robot, please don't be mad, 1177 | maybe if you try support@rocket.chat, they have humans there... 1178 | - | 1179 | Sorry $user I don't know, I definetely don't know how to answer this question 1180 | I'm a limited bot, please understand, I'm learning yet 1181 | You can reach our dev team in support@rocket.chat if you need a human help... 1182 | type: random 1183 | action: error 1184 | 1185 | # common talk 1186 | 1187 | - name: ct-ok 1188 | expect: 1189 | - that's ok 1190 | - ok 1191 | - ok then 1192 | - oki-doki 1193 | - A o-K 1194 | answer: 1195 | - cool 1196 | - nice 1197 | - alright =D 1198 | - =) 1199 | - ;) 1200 | action: respond 1201 | type: random 1202 | 1203 | - name: ct-bye 1204 | expect: 1205 | - bye bye then 1206 | - goodbye 1207 | - see ya 1208 | - close this 1209 | answer: 1210 | - nice talking to you, bye =) 1211 | - great, hope I did helped you, bye bye. 1212 | - farwell, best regards. 1213 | action: respond 1214 | type: random 1215 | 1216 | - name: ct-what 1217 | expect: 1218 | - whaaat 1219 | - say what 1220 | - come again 1221 | answer: 1222 | - whaaaat? 1223 | - what? did I said something wrong? 1224 | - what what? 1225 | action: respond 1226 | type: random 1227 | 1228 | - name: ct-badword 1229 | expect: 1230 | - stupid 1231 | - idiot 1232 | - asshole 1233 | - dumb ass 1234 | - dumb bot 1235 | - mother fucker 1236 | - sucker 1237 | - son of a bitch 1238 | - fuck you 1239 | - fucker 1240 | answer: 1241 | - whaaaat? you don't need to be rude, I'm just a machine.. 1242 | - Oh yeh?! but at least my mother-board teached me better.. 1243 | - You touch people with those fingers? 1244 | - sorry $user, I'm only an experimental bot... 1245 | action: respond 1246 | type: random 1247 | 1248 | # Configuration 1249 | - name: configure-debug 1250 | expect: 1251 | - "configure debug-" 1252 | - "set debug-" 1253 | - "var debug-" 1254 | answer: 1255 | - $key changed to $value! 1256 | - Got it! Now $key is $value 1257 | - $key = $value -> https://media.giphy.com/media/12NUbkX6p4xOO4/giphy.gif 1258 | action: configure 1259 | type: random 1260 | command: setVariable 1261 | role: admin 1262 | 1263 | - name: configure-retrain 1264 | expect: 1265 | - "retrain bot" 1266 | - "reload training" 1267 | - "restart bot" 1268 | - "train again" 1269 | answer: 1270 | - Right >>> Training reloaded 1271 | - You got it $user. Let's start again. 1272 | - Ok, just a moment... Fine we can start it over. 1273 | - Got it! Restarting engines... I'm finished training 1274 | - Training harder! 1275 | - Alright! No pain, no gain! 1276 | action: configure 1277 | type: random 1278 | command: train 1279 | role: admin 1280 | 1281 | - name: configure-livechat 1282 | expect: 1283 | - "configure livechat-" 1284 | - "set livechat-" 1285 | - "var livechat-" 1286 | answer: 1287 | - $key changed to $value! 1288 | - Got it! Now $key is $value 1289 | - $key = $value -> https://media.giphy.com/media/12NUbkX6p4xOO4/giphy.gif 1290 | action: configure 1291 | type: random 1292 | command: setVariable 1293 | role: admin 1294 | --------------------------------------------------------------------------------