Slack Bot for communicating with WiseGPT. Uses OpenAI GPT-3 to simulate a ChatGPT like conversation. The GPT model is in early development and not optimized, will consume more token as the conversation gets bigger.
Slack.Bot.-.Feature.Demo.mp4
- Persona of the bot can be customized since it is using GPT-3
- Only gets involved to the conversations that start with mentioning the bot E.g.
@WiseGPT hello!
- No need to mention bot again for further messages in the same thread
- Keeps conversation history per thread
- Simple loading indicator is shown before calling OpenAI
- Markdown and Slack Blocks are used for output
This project uses AWS CDK for deployment. All infrastructure is automatically provisioned and managed for you. Everything is serverless and should cost almost nothing. You only pay for the OpenAI API tokens used.
- Create your own Slack bot.
- Create an AWS account and set up your profile.
- Create an AWS Secrets Manager Secret.
- Configure
app/YOUR_APP_ID/signing-secret
e.g.app/A04G99ST35L/signing-secret
to your Slack API Signing Secret - Configure
app/YOUR_APP_ID/token
e.g.app/A04G99ST35L/token
to your Slack API token - Configure
open-ai/secret-key
to your OpenAI Secret Key - Create the secret and copy the Secret ARN
- Configure
- Configure
src/config.ts
with your information. Especiallyslack
andaws
sections. - Bootstrap AWS CDK for your account, if you have not already.
- Deploy with
AWS_PROFILE=your-profile npx projen deploy
- Add output Slack Events Request URL to Slack API Events URL
- The bot is in active early development and there maybe non-backwards compatible change. E.g. some older conversations may stop working after deploying a newer version of the bot.
- The token usage maybe high since there was no effort to optimize the used tokens for now. It is a planned feature.
Below projects were helpful when developing this bot, in no specific order: