embedchain/docs/examples/slack-AI.mdx
Embedchain Examples Repo contains code on how to build your own Slack AI to chat with the unstructured data lying in your slack channels.
Create a Slack AI involves 3 steps
Follow the steps given below to fetch your slack user token to get data through Slack APIs:
Create a workspace on Slack if you don’t have one already by clicking here.
Create a new App on your Slack account by going here.
Select From Scratch, then enter the App Name and select your workspace.
Navigate to OAuth & Permissions tab from the left sidebar and go to the scopes section. Add the following scopes under User Token Scopes:
# Following scopes are needed for reading channel history
channels:history
channels:read
# Following scopes are needed to fetch list of channels from slack
groups:read
mpim:read
im:read
Click on the Install to Workspace button under OAuth Tokens for Your Workspace section in the same page and install the app in your slack workspace.
After installing the app you will see the User OAuth Token, save that token as you will need to configure it as SLACK_USER_TOKEN for this demo.
Navigate to api folder and set your HUGGINGFACE_ACCESS_TOKEN and SLACK_USER_TOKEN in .env.example file. Then rename the .env.example file to .env.
Follow the instructions given below to run app locally based on your development setup (with docker or without docker):
docker-compose build
ec start --docker
ec install-reqs
ec start
Finally, you will have the Slack AI frontend running on http://localhost:3000. You can also access the REST APIs on http://localhost:8000.
This demo was built using the Embedchain's full stack demo template. Follow the instructions given here to create your own full stack RAG application.