GithubHelp home page GithubHelp logo

isabella232 / chatbot-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ftlabs/chatbot

0.0 0.0 0.0 138 KB

An FT bot

Shell 2.16% JavaScript 69.96% CoffeeScript 3.22% Handlebars 24.61% Batchfile 0.05%

chatbot-1's Introduction

FTLabs Chatbot Hubot

Internal Doc https://docs.google.com/document/d/1OctttbtcdZUMngXXi5dpic3Yhyij1fxsscx31JmCZFw/edit#

About,

This is the Financial Times Chatbot, running from:

Monday 18th May 2015 - Friday 15th June 2015

as an initial experiment in accessing FT content via a Chatbot in a companies internal messaging. We supported a few platforms:

Example Post request

POST to http://ftlabs-chatbot-test.herokuapp.com/v1/rest

content: application/json

{
	message: "recommend apple"
}

The project has been resurrected as of May 30th 2016 due to growing interest in Chatbots in the wider media community.

Features

Chatbot, if a query is not understood then it allows for a human operator to respond.

Example queries:

Building

The very basic way to start is:

$ npm install
$ npm start

This will start the bot in shell mode and interactive. If the HUBOT_SLACK_TOKEN is set, it will default to slack. Chat with ftbottest when developing locally.

For full usage of Chatbot you will require the following environment variables (found in LastPass. Internal FT usage only)

Tests

To run tests:

$ npm test

Add tests to /test/, mocking any server calls with nock (see examples in /test/nock.js)

Basic

  • PORT - Port to run the webserver from the bot uses this +1, default 3001 (bot uses 3002)
  • REDISTOGO_URL - Redis To Go server to connect to, defaults to looking for a local redis instance
  • HUBOT_HEROKU_KEEPALIVE_URL - URL to stop Redis going to sleep

Interfaces

You can only pick one:

  • HUBOT_WEB_ENDPOINTS - set to 1 to use the web endpoint.

  • HUBOT_SLACK_TOKEN - Required to work with slack, token for connecting to slack bot.

  • SLACK_HOOK_URL - Required to work with slack, team url for connecting to slack bot.

  • HUBOT_GTALK_USERNAME - The bot's username for GTalk will possess that account and respond for it.

API keys

  • ELASTIC_SEARCH_KEY - next-search api
  • EMAILTHIS_RECAPTCHA_KEY - email this api
  • EMAILTHIS_SECRET - email this api
  • BITLY_API_KEY - bitly api
  • BITLY_LOGIN - bitly api
  • CAPI_API_KEY - capi api
  • MARKETS_API_KEY - market api
  • OFFERS_API_KEY - offer api

Adding new commands

Drop a script in /scripts starting with:

// Description:
//     ....
// Commands:
//     ....

Requirements

Node 6+

chatbot-1's People

Contributors

adarosecannon avatar lc512k avatar sqyphen avatar jakechampion avatar lily2point0 avatar wheresrhys avatar seanmtracey avatar snyk-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.