-
Notifications
You must be signed in to change notification settings - Fork 425
GitHub tool #931
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
Merged
Merged
GitHub tool #931
Conversation
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
# Conflicts: # src/interfaces/assistants_web/src/app/(main)/settings/Settings.tsx
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #931 +/- ##
==========================================
- Coverage 81.29% 80.66% -0.63%
==========================================
Files 281 286 +5
Lines 11477 11679 +202
==========================================
+ Hits 9330 9421 +91
- Misses 2147 2258 +111 ☔ View full report in Codecov by Sentry. |
ezawadski
requested changes
Jan 30, 2025
ezawadski
approved these changes
Jan 30, 2025
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.
Github tool implementation
AI Description
This PR adds support for the GitHub tool to the application.
Changes
docs/custom_tool_guides/github.mdis added, which provides instructions for setting up the GitHub tool.README.mdfile is updated to include a link to the new GitHub tool setup guide.poetry.lockfile is modified to add thepygithubpackage, which is required for interacting with the GitHub API.pyproject.tomlfile is updated to include thepygithubpackage as a dependency.src/backend/chat/collate.pyfile is modified to import theToolErrorclass frombackend.tools.base.src/backend/config/configuration.template.yamlfile is updated to include GitHub-related configuration settings.src/backend/config/default_agent.pyfile is modified to include theTool.Github.value.IDin the list of available tools.src/backend/config/secrets.template.yamlfile is updated to include GitHub-related configuration settings.src/backend/config/settings.pyfile is modified to include a new classGithubSettingsfor managing GitHub-related settings.src/backend/config/tools.pyfile is updated to import theGithubToolclass frombackend.tools.github.tool.src/backend/main.pyfile is modified to use thesettingsobject instead ofSettings().get('auth.secret_key')for retrieving the authentication secret key.src/backend/tools/github/__init__.py,src/backend/tools/github/auth.py,src/backend/tools/github/client.py,src/backend/tools/github/constants.py,src/backend/tools/github/tool.py, andsrc/backend/tools/github/utils.pyare added, which provide the implementation of the GitHub tool.src/backend/tools/slack/tool.pyfile is updated to include theshould_return_tokenparameter in theget_tool_definitionmethod.src/interfaces/assistants_web/src/app/(main)/settings/Settings.tsxfile is modified to import theTOOL_GITHUB_IDconstant and use it in theSettingscomponent.src/interfaces/assistants_web/src/assets/icons/Github.tsxfile is added, which provides the SVG icon for the GitHub tool.src/interfaces/assistants_web/src/components/UI/Icon.tsxfile is updated to include theGithubicon in theIconListand the corresponding implementation in thegetIconfunction.src/interfaces/assistants_web/src/constants/tools.tsfile is modified to include theTOOL_GITHUB_IDconstant and the corresponding icon mapping in theTOOL_ID_TO_DISPLAY_INFOobject.Summary
The PR adds support for the GitHub tool, which allows users to search for repositories on GitHub. The changes include adding new files for the GitHub tool implementation, updating existing files to include GitHub-related configuration settings, and modifying the UI to include the GitHub tool in the list of available tools.