Skip to content

A Slack chat bot that can index an arbitrary website and have relevant conversations.

Notifications You must be signed in to change notification settings

snpal/slack-chat-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

slack-chat-bot

A Slack chat bot that can index an arbitrary website and have relevant conversations. Built using LangChain, llama-index, and slack_bolt.

To index an arbitrary site, use the wget command to replace the current contents of sitemap/. Remember to include environment variables SLACK_APP_TOKEN, SLACK_BOT_TOKEN, and OPENAI_API_KEY!

Steps taken to build this:

  1. Create a local mirror of desired website to index.
  2. Learn NLP basics and set up a basic chatbot in Jupyter Notebook using LangChain and lama-index.
  3. Set up a Slack app in Socket mode.
  4. Enable basic, manual interaction in the Slack app (check for event listening and the ability to send messages as the bot).
  5. Integrate the chatbot with Slack to automatically generate responses for messages.

This bot can be further enhanced by tinkering with finer details such as customized responses for various event possibilities (like reactions to messages, app mentions, and more). Coverage can be added for slash commands and incoming webhooks, as well as FAQ-like suggestions for what to ask. This is currently operating in Socket mode, which allows for the bot to be used in workspaces without a public HTTP Request URL. It could be made public and distributable with a redirect URL.

Some examples of ineraction this bot is capable of:

Screen Shot 2023-05-18 at 11 53 54 AM Screen Shot 2023-05-18 at 11 49 59 AM Screen Shot 2023-05-18 at 11 50 23 AM Screen Shot 2023-05-18 at 11 49 24 AM Screen Shot 2023-05-18 at 11 52 11 AM Screen Shot 2023-05-18 at 11 52 40 AM

About

A Slack chat bot that can index an arbitrary website and have relevant conversations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages