-
Notifications
You must be signed in to change notification settings - Fork 363
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
Slack tool #821
Merged
Merged
Slack tool #821
Conversation
This file contains 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
EugeneLightsOn
requested review from
tomtobac,
abimacarmes,
knajjars,
BeatrixCohere,
tianjing-li,
malexw,
scottmx81 and
a team
as code owners
October 24, 2024 15:45
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #821 +/- ##
==========================================
- Coverage 79.73% 79.12% -0.61%
==========================================
Files 244 250 +6
Lines 10486 10673 +187
==========================================
+ Hits 8361 8445 +84
- Misses 2125 2228 +103 ☔ View full report in Codecov by Sentry. |
tianjing-li
reviewed
Oct 29, 2024
tianjing-li
reviewed
Oct 29, 2024
tianjing-li
reviewed
Oct 29, 2024
tianjing-li
reviewed
Oct 29, 2024
tianjing-li
approved these changes
Nov 1, 2024
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.
Slack Tool implementation
SlackTool.mp4
AI Description
This PR adds a new Slack tool to the deployable all-in-one RAG application. The Slack tool allows users to search Slack for relevant document snippets.
The PR includes the following changes:
docs/custom_tool_guides/slack.md
, is added, which provides instructions for setting up the Slack tool.poetry.lock
file is updated to include theslack-sdk
package, which is required for the Slack tool.pyproject.toml
file is updated to include theslack-sdk
package as a dependency.src/backend/config/configuration.template.yaml
file is updated to include a newslack
section, which specifies the user scopes required for the Slack tool.src/backend/config/secrets.template.yaml
file is updated to include a newslack
section, which specifies the client ID and client secret required for the Slack tool.src/backend/config/settings.py
file is updated to include a newSlackSettings
class, which is used to configure the Slack tool.src/backend/config/tools.py
file is updated to include newSlackAuth
andSlackTool
classes, which are used to authenticate and interact with the Slack tool.src/backend/tools/__init__.py
file is updated to include newSlackAuth
andSlackTool
classes, which are used to authenticate and interact with the Slack tool.src/backend/tools/base.py
file is updated to include a newtool_auth_crud.delete_tool_auth
method, which is used to delete tool authentication information.src/backend/tools/slack/__init__.py
file is added, which imports theSlackAuth
,SlackTool
, andSLACK_TOOL_ID
constants from thebackend.tools.slack
module.src/backend/tools/slack/auth.py
file is added, which defines theSlackAuth
class, which is used to authenticate the Slack tool.src/backend/tools/slack/client.py
file is added, which defines theSlackClient
class, which is used to interact with the Slack API.src/backend/tools/slack/constants.py
file is added, which defines theSEARCH_LIMIT
andSLACK_TOOL_ID
constants, which are used by the Slack tool.src/backend/tools/slack/tool.py
file is added, which defines theSlackTool
class, which is used to search Slack for relevant document snippets.src/backend/tools/slack/utils.py
file is added, which defines theSlackService
class, which is used to interact with the Slack API.src/interfaces/assistants_web/src/app/(main)/settings/Settings.tsx
file is updated to include a newSlackConnection
component, which is used to display the Slack connection status.src/interfaces/assistants_web/src/components/AgentSettingsForm/StatusConnection.tsx
file is added, which defines theStatusConnection
component, which is used to display the Slack connection status.src/interfaces/assistants_web/src/components/AgentSettingsForm/ToolsStep.tsx
file is updated to include a newhandleAuthButtonClick
prop, which is used to handle authentication for the Slack tool.src/interfaces/assistants_web/src/components/AgentSettingsForm/index.tsx
file is updated to include a newhandleAuthButtonClick
method, which is used to handle authentication for the Slack tool.src/interfaces/assistants_web/src/components/UI/Icon.tsx
file is updated to include a newSlack
component, which is used to display the Slack icon.src/interfaces/assistants_web/src/constants/tools.ts
file is updated to include a newTOOL_SLACK_ID
constant, which is used to identify the Slack tool.