Your friendly neighbourhood chatbot. I run on cloudflare workers and pass messages between openai api and slack.
You'll need the following things to run me
- Account at cloudflare.com
- Account on platform.openai.com
- Slack Workspace
- Create API key to OpenAI's API.
- Install Slack bot application and grant the following scopes to it
app_mention:read
,chat:write
andchat:write.public
. - Take note of the Bot User oauth token and signing secret as you will need those later.
- Install project dependencies with
yarn install
. - Login to cloudflare
yarn wrangler login
. - Create secrets to cloudflare and paste the corresponding values when prompted.
yarn wrangler secret put OPENAI_API_KEYS
yarn wrangler secret put SLACK_BOT_TOKEN
yarn wrangler secret put SLACK_SIGNING_SECRET
- Deploy the application
yarn wrangler deploy
. - Copy the resulting URL and subscribe to event
app_mention
in Slack application events. The url should look something likehttps://jarvis.${yourSubdomain}.workers.dev/events
. - Invite the application to your favorite channel and talk to it i.e.
@Jarvis what is the airspeed velocity of an unladen swallow?
.