Adios: Hey, I'm Adios, glad to make your acquaintance. Ask me about anime, dogs, anything you like... also I use arch btw ✌️peace.
Demo.mp4
- Visit slack website , signin, create a new workspace, in which we will install our chatbot later.
- Follow the instructions, and create channels for your workspace.
- To create your slackbot, visit slack api website, and click on
create new app
. - Then click on
from scratch
and give your slack bot a name and choose workspace you newly created. - Once this is done you should be directed at Basic information page.
- Go to
OAuth and Permissions
section and setScopes
: These scopes set what your bot can access and its permissions.
You need to add the following scopes to your bot:
i. app_mentions:read
ii. commands
iii. im:write
iv. im:read
v. chat:write
vi. groups:read
vii. groups:history
viii. channels:history
ix. im:history
x. user.profile:read
xi. mpim:history
xii. mpim:read - Then go to
Install app
and click oninstall to workspace
button to add to your workspace. - Once you are done then, go to
Basic information
then toApp creentials
then copy and notesigning secret
, and then navigate toInstall app
and copy and noteBot User oAuth Token
. - Then scroll down, in
App-level Token
create your token, give it a name and addconnections:write
,authorizations:read
scopes to it. - Then click on
Generate Tokens and Scopes
and copy/note the generated token. - Go to
Socket Mode
in settings and enablesocket mode
. - Then under features, go to
Event Subscriptions
, toggle on theEvent Enable
, then scroll down and click on theSubscribe to bot events
and add the following events:
i. message.channel
ii. message.groups
iii. message.im iv. message.mpim
for more info visit https://api.slack.com/legacy/oauth-scopes . - Now go to
App Home
under features, set your bot display name and username, scroll down and toggle onMessages Tab
and tick the checkbox below it.
- Before moving forward, visit https://mdb.ai/ , and signup and copy/note your mindsdb api key.
- Now fork this repo, then git clone it locally to your computer.
- Open the repo in your code editor.
- Now copy the contents from
.env.example
, then create a new.env
and paste the content in it. - Place the respective credentials you obtained in point [8], [9] and [10], in
.env
file. - Open the terminal in the cloned repo.
- Run the following commands in order:
npm i
npm start
Note: For this project you need to have nodejs installed in your system.
Now you should be able to add your chatbot in your channels in the workspace you created and chat with it!
- Nodejs for backend.
- OpenAI sdk for llama-3-70b model integration powered by Mindsdb.
- Boltjs for slackbot development. Visit https://slack.dev/bolt-js/tutorial/getting-started for more information.
Feel free to contribute and reach out if needed.
- Fork the repo, make the contribution in a separate branch, raise PR and done!
- Do 🌟 the repo to show support.