Skip to content

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.63780% with 133 lines in your changes missing coverage. Please review.

Project coverage is 79.95%. Comparing base (29f614e) to head (1cbebe6).

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/hybrid_search.py 33.33% 2 Missing ⚠️
src/backend/tools/web_scrape.py 50.00% 2 Missing ⚠️
src/backend/tools/files.py 80.00% 1 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.95%   -0.72%     
==========================================
  Files         286      292       +6     
  Lines       11679    11898     +219     
==========================================
+ Hits         9421     9513      +92     
- 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

@ezawadski ezawadski force-pushed the feat/sharepoint_tool branch from e71168f to a64fa0a Compare January 30, 2025 19:17
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, small fix is requested

@ezawadski ezawadski enabled auto-merge (squash) January 31, 2025 15:09
@ezawadski ezawadski merged commit 83cd749 into main Jan 31, 2025
8 checks passed
@ezawadski ezawadski deleted the feat/sharepoint_tool branch January 31, 2025 15:09
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.

4 participants