a ChatGPT based slack chatting bot who response to direct messages, locally deploy with slack socket mode.
- Go to the OpenAI API website https://platform.openai.com/docs/guides/completion
- Log in or sign up for an OpenAI account
- Go to the API Key section and create a new API key
- Copy the API key, Paste OPENAI_API_KEY into the Dockerfile
- Go to the Slack API website https://api.slack.com/
- Click on “Create an app” and select “From scratch”
- Give your app a name, select your Slack workspace
- In Basic information > Add features and functionality. Click on “Permissions” and in Scopes add in Bot Token Scopes: all permissions needed are listed in chitchat/slack-app-configs/OATH&permissions.txt
- Features > Event Subscriptions >. Click on “Subscribe to bot events” and in Scopes add events subscriptions: all permissions needed are listed in chitchat/slack-app-configs/event-subscriptions.txt
- In settings, click on “Socket Mode”, enable it and give the token a name. Copy the Slack Bot App Token (starts with xapp), paste into the Dockerfile
- In Basic information > Add features and functionality. Click on “Event Subscriptions” and enable it. Furthermore in “Subscribe to bot events” select “app_mention”. Save changes.
- Go to the “OAuth & Permissions” section and install your app to your workspace
- Copy the Slack Bot Token (starts with xoxb), paste into the Dockerfile
docker build -t chitchat-image .
docker run chitchat-image
use ctrl + R to refresh the Slack, send a direct message to your bot, now you can start chat!