repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | [Embedchain Examples Repo](https://github.com/embedchain/examples) contains code on how to build your own Slack AI to chat with the unstructured data lying in your slack channels. |
| #2 | |
| #3 |  |
| #4 | |
| #5 | ## Getting started |
| #6 | |
| #7 | Create a Slack AI involves 3 steps |
| #8 | |
| #9 | * Create slack user |
| #10 | * Set environment variables |
| #11 | * Run the app locally |
| #12 | |
| #13 | ### Step 1: Create Slack user token |
| #14 | |
| #15 | Follow the steps given below to fetch your slack user token to get data through Slack APIs: |
| #16 | |
| #17 | 1. Create a workspace on Slack if you don’t have one already by clicking [here](https://slack.com/intl/en-in/). |
| #18 | 2. Create a new App on your Slack account by going [here](https://api.slack.com/apps). |
| #19 | 3. Select `From Scratch`, then enter the App Name and select your workspace. |
| #20 | 4. Navigate to `OAuth & Permissions` tab from the left sidebar and go to the `scopes` section. Add the following scopes under `User Token Scopes`: |
| #21 | |
| #22 | ``` |
| #23 | # Following scopes are needed for reading channel history |
| #24 | channels:history |
| #25 | channels:read |
| #26 | |
| #27 | # Following scopes are needed to fetch list of channels from slack |
| #28 | groups:read |
| #29 | mpim:read |
| #30 | im:read |
| #31 | ``` |
| #32 | |
| #33 | 5. 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. |
| #34 | 6. 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. |
| #35 | |
| #36 | ### Step 2: Set environment variables |
| #37 | |
| #38 | 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`. |
| #39 | |
| #40 | |
| #41 | <Note> |
| #42 | By default, we use `Mixtral` model from Hugging Face. However, if you prefer to use OpenAI model, then set `OPENAI_API_KEY` instead of `HUGGINGFACE_ACCESS_TOKEN` along with `SLACK_USER_TOKEN` in `.env` file, and update the code in `api/utils/app.py` file to use OpenAI model instead of Hugging Face model. |
| #43 | </Note> |
| #44 | |
| #45 | ### Step 3: Run app locally |
| #46 | |
| #47 | Follow the instructions given below to run app locally based on your development setup (with docker or without docker): |
| #48 | |
| #49 | #### With docker |
| #50 | |
| #51 | ```bash |
| #52 | docker-compose build |
| #53 | ec start --docker |
| #54 | ``` |
| #55 | |
| #56 | #### Without docker |
| #57 | |
| #58 | ```bash |
| #59 | ec install-reqs |
| #60 | ec start |
| #61 | ``` |
| #62 | |
| #63 | Finally, you will have the Slack AI frontend running on http://localhost:3000. You can also access the REST APIs on http://localhost:8000. |
| #64 | |
| #65 | ## Credits |
| #66 | |
| #67 | This demo was built using the Embedchain's [full stack demo template](https://docs.embedchain.ai/get-started/full-stack). Follow the instructions [given here](https://docs.embedchain.ai/get-started/full-stack) to create your own full stack RAG application. |
| #68 |