7

Creating an Intelligent Slackbot on AWS

The man who can drive himself further once the effort gets painful is the man who will win.

Roger Bannister

It has long been a dream to create “artificial life.” One of the most common ways to accomplish this has been to create bots. Bots are increasingly becoming part of our everyday life, especially with the rise of Apple’s Siri and Amazon’s Alexa. In this chapter, the mysteries of how to create bots are revealed.

Creating a Bot

To create a bot, use the Python Slack library (https://github.com/slackapi/python-slackclient). To do anything with Slack, a token first needs to be generated. Generally, a good idea for dealing with tokens like this is to export an environmental variable. I often do this inside ...

Get Pragmatic AI: An Introduction to Cloud-Based Machine Learning, First Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.