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

Tools: sharepoint tool #929

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Tools: sharepoint tool #929

wants to merge 12 commits into from

Conversation

ezawadski
Copy link
Collaborator

@ezawadski ezawadski commented Jan 28, 2025

Added Sharepoint Tool

AI Description

This PR introduces the Sharepoint tool, which allows users to search and retrieve documents from Sharepoint. The tool is integrated into the backend and frontend, providing a seamless experience for users.

Changes:

  • New Sharepoint Tool: The PR adds a new tool called Sharepoint, enabling users to search and access documents stored in Sharepoint.
  • Sharepoint Tool Setup: A new document provides detailed instructions for setting up the Sharepoint tool, including configuring API access, registering a new application, and setting permissions.
  • Sharepoint Configuration: The configuration.template.yaml and secrets.template.yaml files are updated to include Sharepoint-specific configurations, such as tenant_id, client_id, and client_secret.
  • Sharepoint Settings: A new class, SharepointSettings, is introduced in settings.py to handle Sharepoint-specific settings.
  • Sharepoint Tool Integration: The Sharepoint tool is integrated into the backend and frontend, with relevant imports and class definitions added to various files, including __init__.py, tool.py, auth.py, and constants.py.
  • Sharepoint Authentication: The auth.py file implements the SharepointAuth class, which handles authentication for the Sharepoint tool, ensuring secure access to user data.
  • Sharepoint Constants: The constants.py file defines constants specific to the Sharepoint tool, such as SHAREPOINT_TOOL_ID and SEARCH_LIMIT.
  • Sharepoint Tool Implementation: The tool.py file contains the SharepointTool class, which defines the tool's functionality, including searching for documents, retrieving file contents, and serializing results.
  • Sharepoint Utilities: The utils.py file provides utility functions for the Sharepoint tool, such as serialize_metadata and serialize_file_contents, which handle data serialization and file content processing.
  • Sharepoint Connection Component: A new component, SharepointConnection, is added to the frontend, allowing users to connect to Sharepoint, authenticate, and manage their connection.
  • Sharepoint Icon: A new icon, Sharepoint, is introduced in the frontend, providing a visual representation of the Sharepoint tool.

@codecov-commenter
Copy link

codecov-commenter commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 47.15447% with 130 lines in your changes missing coverage. Please review.

Project coverage is 79.94%. Comparing base (29f614e) to head (d167c9d).

Files with missing lines Patch % Lines
src/backend/tools/sharepoint/tool.py 34.83% 58 Missing ⚠️
src/backend/tools/sharepoint/auth.py 34.72% 47 Missing ⚠️
src/backend/tools/sharepoint/utils.py 16.66% 20 Missing ⚠️
src/backend/tools/gmail/tool.py 60.00% 2 Missing ⚠️
src/backend/tools/web_scrape.py 50.00% 2 Missing ⚠️
src/backend/tools/google_drive/tool.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #929      +/-   ##
==========================================
- Coverage   80.66%   79.94%   -0.72%     
==========================================
  Files         286      291       +5     
  Lines       11679    11894     +215     
==========================================
+ Hits         9421     9509      +88     
- Misses       2258     2385     +127     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@EugeneLightsOn EugeneLightsOn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - just a few small changes requested

src/backend/tools/sharepoint/tool.py Show resolved Hide resolved
src/backend/tools/sharepoint/tool.py Show resolved Hide resolved
@ezawadski ezawadski force-pushed the feat/sharepoint_tool branch from e71168f to a64fa0a Compare January 30, 2025 19:17
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.

3 participants