Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: auto reply to public questions via dm 🤖 #518

Merged
merged 2 commits into from
Sep 17, 2024
Merged

Conversation

ramiAbdou
Copy link
Member

@ramiAbdou ramiAbdou commented Sep 17, 2024

Description ✏️

Adds support for auto replying to questions asked in certain public channels. These responses are full LLM (RAG implementation) responses but are sent to DM. The key UX decision here is we don't want to take away from the community feel by having the bot reply publicly to every single message in a channel (despite that others may learn from it).

This PR:

  • Implements the core answerPublicQuestionInPrivate function, which is similar to answerChatbotQuestion with a slightly different UX (ie: won't respond if nothing high confidence is found).
  • Adds a slack.question.answer.private Bull job.
  • Stores the "auto reply channels" in Redis, and reads that after a message is created in order to determine
  • Adds a Public Question Answered Mixpanel event.
  • Makes the user optional on a Mixpanel event, this is important for tracking non-user specific events such as our system automatically responding to public questions.
  • Returns the ts of a Slack message when a notification is sent.
  • Updates getAnswerFromSlackHistory to take in threads in order to be able to allow the caller to customize which threads the LLM takes into account and also adds thread references in that function.

Type of Change 🐞

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist ✅

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

@ramiAbdou ramiAbdou self-assigned this Sep 17, 2024
@ramiAbdou ramiAbdou marked this pull request as ready for review September 17, 2024 05:03
@ramiAbdou ramiAbdou merged commit d345f51 into main Sep 17, 2024
1 check passed
@ramiAbdou ramiAbdou deleted the rami/auto-reply-dm branch September 17, 2024 05:05
iperalta7 pushed a commit to iperalta7/oyster that referenced this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant