An example implementation of the slack-gpt starter which ingests confluence pages to create a helpful slack bot

Overview

Slack-GPT (HR bot example implementation)

Table of Contents

  1. Introduction
  2. Prerequisites
  3. Creating and installing the application
  4. Configuration
  5. Starting the app
  6. Next Steps

Introduction

This is an example implementation of Slack-GPT, A simple starter for a Slack app / chatbot that uses the Bolt.js Slack app framework, Langchain, openAI and a Pinecone vectorstore to provide LLM generated answers to user questions based on a custom data set.

This example connects to confluence and ingests and embeds all of it's pages, in order to act as a helpful HR assistant bot for a company.

This example provides a start to finish solution for how to converse with your own data in Slack using Chat-GPT, Langcahin, Pinecone and Bolt.js.

Prerequisites

You'll need a pinecone database set up, a confluence account and a slack workspace.

Creating and installing the application

  1. Step 1: Log in to your slack account and visit: https://api.slack.com/apps
  2. Step 2: Click the "Create New App" button and choose to create the app "from manifest"
  3. Step 3: Choose the slack workspace to which you want to add the chat bot
  4. Step 4: Paste in the following manifest and edit the name of your app accordingly
  name: [YOUR_APP_NAME_HERE]
features:
  bot_user:
    display_name: [YOUR_APP_DISPLAY_NAME_HERE]
    always_online: true
oauth_config:
  scopes:
    bot:
      - chat:write
      - chat:write.customize
      - im:history
      - im:write
      - app_mentions:read
      - im:read
settings:
  event_subscriptions:
    bot_events:
      - app_mention
      - message.im
  interactivity:
    is_enabled: true
  org_deploy_enabled: false
  socket_mode_enabled: true
  token_rotation_enabled: false
  1. Step 5: Click next and then click the button confirming the creation of your app
  2. Step 6: Navigate to the "basic information" page and click the "generate token and scopes" button under the app level tokens section
  3. Step 7: Create a token called Websockets and add the "connections:write" scope, copy your token and keep it somewhere safe
  4. Step 8: Navigate to "app home" and check the box "Allow users to send Slash commands and messages from the messages tab"
  5. Step 9: Navigate to the "Oauth and permissions" page and click the "install to workspace" button, then click to allow the installation and nececarry permissions. You should now see your Application in your apps list when opening your slack workspace

Configuration

  1. Step 1: Create a .env file in the root of your project and copy the .env.sample contents in to the new file
  2. Step 2: Add your websockets app level token we created earlier to the SLACK_APP_TOKEN variable
  3. Step 3: Head back to "Oath and permissions" and copy the "Bot User OAuth Token", and add it to the SLACK_BOT_TOKEN variable
  4. Step 4: Head to "Basic information" and copy your "Signing Secret" and save it to the SLACK_SIGNING_SECRET variable
  5. Step 5: Fill out your openai and pinecone related environment variables (Again, you'll need to have set up a pinecone index with your data embeddings)

Starting the app

  1. Step 1: Navigate to your application roon and run npm start You should now see that the bolt app is running and that your application has made a successful connection to slack
  2. Step 2: Navigate to your slack workspace and try sending your new bot a DM!

Next steps

  • Set up a production employment and start your bot on a server somewhere other than your local machine - https://render.com/ is a good, simple option for this.
  • More comprehensive setup instructions with confluence, pinecone etc coming soon!
You might also like...

Obsidian text generator Plugin Text generator using GPT-3 (OpenAI)

Obsidian text generator Plugin Text generator using GPT-3 (OpenAI)

is a handy plugin for Obsidian that helps you generate text content using the powerful language model GP

Dec 29, 2022

A simple gpt-3 integration with Logseq

Readme Using GPT-3 in [[logseq]] is actually remarkably easy. The folks over at OpenAI have built a really powerful model with pretty good documentati

Jul 19, 2022

Labels issues using OpenAI's Classification API powered by GPT-3 models!

Labels issues using OpenAI's Classification API powered by GPT-3 models!

OpenAI Issue Labeler 🤖 This GitHub action labels issues using OpenAI's Classification API powered by GPT-3 models! We are using curie as our completi

Dec 21, 2022

A plugin for GPT-3 AI assisted note taking in Logseq

A plugin for GPT-3 AI assisted note taking in Logseq

logseq-plugin-gpt3-openai A plugin for GPT-3 AI assisted note taking in Logseq Usage Just type /gpt3 in a block or select gpt3 from the block menu. Se

Jan 3, 2023

A simple CLI experiment that writes recommendation of GitHub repository/project in form of tweet. Powered by OpenAI GPT-3.

A simple CLI experiment that writes recommendation of GitHub repository/project in form of tweet. Powered by OpenAI GPT-3.

GitHub Repo Recommendation Writer A simple CLI experiment that writes recommendation of GitHub repository/project in form of tweet. Powered by OpenAI

Jul 18, 2022

App that leverages GPT-3 to facilitate new language listening and speaking practice.

App that leverages GPT-3 to facilitate new language listening and speaking practice.

Talk w/GPT-3 app: Getting started The Talk w/GPT-3 application was developed by James L. Weaver (the author of this document) to get more new language

Jan 1, 2023

GPT-3 powered cli tool to help with bash commands you can't remember

qwery GPT-3 powered cli tool to help with bash commands you can't remember eg $ qw ffmpeg command to transcode mp4 to mov QWERY RESULT: ffmpeg -i inpu

Oct 31, 2022

This repository contains a fullstack chatbot project based on the ChatGPT `gpt-3.5-turbo` model.

This is a fullstack chatbot created with React, Nodejs, OpenAi, and ChatGPT while developing the following tutorial: How To Build A Chat Bot Applicati

May 10, 2023

Chat with GPT from the terminal, with the ability to execute shell scripts.

Chat with GPT from the terminal, with the ability to execute shell scripts.

ChatSH Chat with GPT from the terminal, and let it execute shell scripts and perform tasks for you. What could go wrong? Example Why? The reason I'm p

Jun 11, 2023
Owner
Martin Hunt
Hi! I'm Martin, I'm an engineer and technology leader with over 10 years experience building production applications and high performing remote technical teams.
Martin Hunt
slack-friends Make it easy to send to Slack from your application

slack-friends Make it easy to send to Slack from your application Installation ?? npm install slack-friends How to get bot token https://api.slack.com

Taein Kang 9 Aug 23, 2022
Start building admin tools on Slack without going into complex slack syntax and flows.

Slackmin Slackmin helps in easy integration with slack to use slash commands, interactive components, format and send messages, design and use modals.

PLG Works 49 Jan 2, 2023
A simple slack app / bot starter that fetches answers to questions using Langchain, OpenAI and a Pincone vectorstore

Slack-GPT Table of Contents Introduction Prerequisites Creating and installing the application Configuration Starting the app Next Steps Sample Implem

Martin Hunt 51 Jul 30, 2023
A list of helpful front-end related questions you can use to interview potential candidates, test yourself or completely ignore.

Front-end Developer Interview Questions This repository contains a number of front-end interview questions that can be used when vetting potential can

H5BP 56.1k Jan 4, 2023
Helpful for-loop shorthands in JavaScript

Optimized.JS This package aims to optimize your JavaScript where speed it critical. It has long been known that the JS for-loop is the fastest method

E 1 Jan 21, 2022
Show a helpful summary of test results in GitHub Actions CI/CD workflow runs

Test Summary Produce an easy-to-read summary of your project's test data as part of your GitHub Actions CI/CD workflow. This helps you understand at-a

Test Summary 293 Jan 2, 2023
VSCode extension with helpful code snippets for SolidJS.

Solid Snippets VSCode extension with helpful code snippets for SolidJS. GET THE EXTENSION Snippets Trigger Content Languages JSX sinput→ Input two-way

SolidJS Community 11 Dec 8, 2022
A community-led experiment to build better docs and helpful content :)

Website This website is built using Docusaurus 2, a modern static website generator. Installation $ npm Local Development $ npm start This command s

Battlesnake Official 9 Jan 1, 2023
Statistics plugin for RemNote that will give you some helpful numbers, charts and heatmap for your knowledge base.

RemNote statistics plugin Features This plugin will give you the following statistics: Retention rate Number of cards due in future Type of buttons yo

Henrik 3 Sep 9, 2022
An interactive Bitcoin tutorial for orange-pilled beginners. Illustrates technical Bitcoin concepts using JavaScript and some Bitcoin Core RPC commands. Programming experience is helpful, but not required.

Try Bitcoin Try Bitcoin is an interactive Bitcoin tutorial inspired by and forked from Try Regex, which is inspired by Try Ruby and Try Haskell. It il

Stacie Waleyko 33 Nov 25, 2022