-
Notifications
You must be signed in to change notification settings - Fork 384
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
GitHub tool #931
Merged
Merged
GitHub tool #931
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
# Conflicts: # src/interfaces/assistants_web/src/app/(main)/settings/Settings.tsx
EugeneLightsOn
requested review from
tomtobac,
abimacarmes,
knajjars,
BeatrixCohere,
tianjing-li,
ezawadski,
malexw and
a team
as code owners
January 30, 2025 15:43
EugeneLightsOn
requested a deployment
to
development
January 30, 2025 15:43 — with
GitHub Actions
Waiting
EugeneLightsOn
requested a deployment
to
development
January 30, 2025 15:47 — with
GitHub Actions
Waiting
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. |
EugeneLightsOn
requested a deployment
to
development
January 30, 2025 16:08 — with
GitHub Actions
Waiting
ezawadski
requested changes
Jan 30, 2025
EugeneLightsOn
temporarily deployed
to
development
January 30, 2025 16:16 — with
GitHub Actions
Inactive
EugeneLightsOn
requested a deployment
to
development
January 30, 2025 16:54 — with
GitHub Actions
Waiting
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.md
is added, which provides instructions for setting up the GitHub tool.README.md
file is updated to include a link to the new GitHub tool setup guide.poetry.lock
file is modified to add thepygithub
package, which is required for interacting with the GitHub API.pyproject.toml
file is updated to include thepygithub
package as a dependency.src/backend/chat/collate.py
file is modified to import theToolError
class frombackend.tools.base
.src/backend/config/configuration.template.yaml
file is updated to include GitHub-related configuration settings.src/backend/config/default_agent.py
file is modified to include theTool.Github.value.ID
in the list of available tools.src/backend/config/secrets.template.yaml
file is updated to include GitHub-related configuration settings.src/backend/config/settings.py
file is modified to include a new classGithubSettings
for managing GitHub-related settings.src/backend/config/tools.py
file is updated to import theGithubTool
class frombackend.tools.github.tool
.src/backend/main.py
file is modified to use thesettings
object 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.py
are added, which provide the implementation of the GitHub tool.src/backend/tools/slack/tool.py
file is updated to include theshould_return_token
parameter in theget_tool_definition
method.src/interfaces/assistants_web/src/app/(main)/settings/Settings.tsx
file is modified to import theTOOL_GITHUB_ID
constant and use it in theSettings
component.src/interfaces/assistants_web/src/assets/icons/Github.tsx
file is added, which provides the SVG icon for the GitHub tool.src/interfaces/assistants_web/src/components/UI/Icon.tsx
file is updated to include theGithub
icon in theIconList
and the corresponding implementation in thegetIcon
function.src/interfaces/assistants_web/src/constants/tools.ts
file is modified to include theTOOL_GITHUB_ID
constant and the corresponding icon mapping in theTOOL_ID_TO_DISPLAY_INFO
object.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.