langchain-ai / langchain-aws-template

Build Generative AI applications with Langchain on AWS
Other
170 stars 50 forks source link

Deployment template for a Slack Bot #3

Closed 3coins closed 1 year ago

3coins commented 1 year ago

Summary

This PR adds the package that contains infrastructure and the code to deploy and run a backend service that can process slack messages and respond with an answer from an LLM chain (chain.py). The package also contains a manifest file (slack-bot-app.yml) that can be imported directly to create a slack bot app. This app should be installed in your workspace for users to start using the application.

Service Design

Slack Bot Design

3coins commented 1 year ago

@JasonWeill Thanks for that suggestion!

Is there a way to set the "… is typing" flag in Slack for the bot user while it is composing a reply?

There is no direct way I have found so far to do this in Slack API. One solution is to add a message with a emoji or "..." to signify that bot is doing something, and then update that message with the actual reply. This is a bit of a hack, and can get quite complicated if there are messages from other users in the same channel; for example, in this case, we might not want to show "..." for each individual message request or make sure "..." appears at the end of the latest message.