feat: add Slack and Discord Moss Q&A demo#397
Open
hasnainkhatri87 wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an experimental community demo under moss-live-labs/community-demos/slack-discord-qa that answers workspace questions in Slack (Socket Mode app_mention) and Discord (!ask / bot mentions) using a shared Moss retrieval + OpenAI-compatible answering pipeline.
Changes:
- Introduces Slack and Discord adapters that extract questions and post threaded replies.
- Adds a shared
AnswerEnginewith bounded context construction and pluggable retriever/responder protocols. - Adds demo documentation, environment templates, packaging (
pyproject.toml), and credential-free unit tests.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| moss-live-labs/community-demos/slack-discord-qa/moss_slack_discord/adapters.py | Slack/Discord event adapters + question extraction logic |
| moss-live-labs/community-demos/slack-discord-qa/moss_slack_discord/qa_engine.py | Shared retrieval/response engine and bounded context builder |
| moss-live-labs/community-demos/slack-discord-qa/moss_slack_discord/app.py | App wiring: env loading, Moss index load, OpenAI responder, adapter startup |
| moss-live-labs/community-demos/slack-discord-qa/tests/test_adapters.py | Unit tests for Slack/Discord message extraction |
| moss-live-labs/community-demos/slack-discord-qa/tests/test_qa_engine.py | Unit tests for context building + answer engine behavior |
| moss-live-labs/community-demos/slack-discord-qa/README.md | Setup/configuration documentation for Slack + Discord |
| moss-live-labs/community-demos/slack-discord-qa/pyproject.toml | Demo package metadata, dependencies, script entrypoint, pytest config |
| moss-live-labs/community-demos/slack-discord-qa/moss_slack_discord/init.py | Package marker / module docstring |
| moss-live-labs/community-demos/slack-discord-qa/.env.example | Example environment variables for Moss/OpenAI/Slack/Discord |
| moss-live-labs/community-demos/slack-discord-qa/.gitignore | Ignores local env/venv/test caches |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Description
Summary
Adds a community demo that answers workspace questions in Slack and Discord using a shared Moss retrieval pipeline.
Implementation
!askmessages and direct bot mentions.Testing
uv run pytest— 8 passeduv run ruff check .— passeduv run ruff format --check .— passedCompatibility and risk
This is an additive experimental demo under
moss-live-labs/community-demos. Live Slack/Discord behavior requires platform credentials and a configured Moss index; those external integrations were not exercised locally.Fixes #384
Type of Change