NOTICE: openai.com has limit its token permisson, so this repo fail to work, will resume this repo when openai.com officially support ChatGPT API
- Set the chatgpt token by command
/set-chatgpt-token
- Talk with
@ChatGPT
in DM channel - Invite the
@ChatGPT
then direct, then mention@ChatGPT
to talk with ChatGPT - Conversation by channel
- each channel (DM, group, public channel etc) give one conversation
- reset the channel conversation by
/reset-chatgpt-conversation
click Add To Slack
Goal: we will step by step to fill the .env
properties
- open socket mode
- set the App Display name as your need
- Add bot user since we want to mention @ChatGPT to let it work
goto app oauth page: https://api.slack.com/apps//oauth, make Scopes as:
- where
chat:write
can direct talk in im - where
app_mentions:read
can@ChatGPT
to talk in channel
/chatgpt
Command to direct send question to ChatGPT/reset-chatgpt-conversation
Command to reset the conversation thread to cleanup the context/set-chatgpt-token
Command to globally set new Bearer Auth token which are copied from ChatGPT website/print-chatgpt-token
Command to print current Bearer Auth token
- Find in the Oauth & Permissions tab
SLACKBOT_TOKEN=xoxb-
- Find in Basic Information Tab
SLACKBOT_SIGNING_SECRET=
- Token from the App-level Token that we created
SLACKBOT_APP_TOKEN=xapp-xxx
put into .env file CHATGPT_AUTH_TOKEN=<copied token value>
- you can use
/set-chatgpt-token
to setup the token for update, e.g. you may need reset the thread, and don't want to reset the bot server.
git clone
npm i
npm run build
npm run start
then you can use ChatGPT in Slack.
docker build -t chatgpt-slackbot
docker run -it --rm chatgpt-slackbot