Markov-chain based chatbot which uses Slack messages as its corpus

Friendbot is a Markov-chain based chatbot which uses Slack messages as its corpus. It reads in messages from a Slack data export, generates a corpus from them, and feeds this to a markov chain generator to naively simulate a conversation. It is built with Flask, served by Gunicorn, cached by Redis, and run in Docker. The sentences which it generates can be accessed via an API which is designed to connect to the existing Slack API.
Installation
Download the docker-compose.yaml
file (or clone this repo), and start by letting Friendbot know the location of your Slack export zip file by running
FB_EXPORT= docker compose-up -d
Configuration
All config is done via environment variables, listed below:
Parameter | Description | Default |
---|---|---|
FRIENDBOT_LOG_LEVEL |
Friendbot’s log level | info |
FRIENDBOT_EXPORT_ZIP |
Path (inside Friendbot)
|