Giter VIP home page Giter VIP logo

slack-gpt's Introduction

SlackGPT

A slack integration for OpenAI's Chat GPT on AWS

Features

  • Responds to mentions
  • Uses chat history
  • Customizable system prompt on deployment

## Limitations

  • API Gateway's 30 seconds response time => may cause timeouts if the prompt (including chat history) requires longer processing by Chat GPT
  • No robust error handling
  • Deployment may require manual actions => See Considerations section

Getting Started

This section will guide you through the setup process

Pre-requisites

  • AWS account
  • OpenAI account
  • Slack account

Deployment

This section will walk you through the deployment process

  1. Create a Slackbot

Follow the link in the official documentation for instructions. You can use the provided App Manifest to create the app instead of doing it from scratch, or use it as a reference for the manual configuration. However make sure you comment out / omit the event_subscriptions section untill AWS deployment is complete.

  1. Install the app to your workspace

  2. Generate authorization tokens

    • Generate a Slackbot token from OAuth & Permissions
    • Create a ChatGPT token here
  3. Build & Deploy the project

npm run build -s
npm run deploy -s
  1. Enable event_subscriptions for the bot using the SlackRequestUrl (see Outputs section after deployment) as request_url.

Follow the instructions of AWS SAM and use your GPT and slack tokens to

Considerations

After deployment some you need to perform the following manual changes on the created resources:

  • Give the Http API gateway permissions to invoke lambda (done with AWS CLI)
  • Enable TTL for ttl parameter of DynamoDB table

slack-gpt's People

Contributors

alexx666 avatar

Stargazers

Vince Fulco--Bighire.tools avatar

Watchers

 avatar  avatar

slack-gpt's Issues

[BUG]: extend timeout and provide error feedbacks

Currently the bot has no error handling and errors out due to the established 30 second timeout for the chatGPT completion.

Idealy errors would be handled by either retrying or sending feedback to the user via slack.
Additionaly, the timeout should be extended, if possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.