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

refactor(component): Convert Tavily Search to standard component pattern #5430

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

Conversation

raphaelchristi
Copy link
Contributor

This pull request modifies the Tavily Search component to follow the standard component pattern used in components like URL fetcher. The main changes are:

  • Converts from LCToolComponent to Component to support direct data and text outputs
  • Removes tool-specific code and schemas
  • Adds text output capabilities alongside data output
  • Simplifies error handling to return Data objects instead of raising exceptions
  • Renames methods to follow component naming conventions

Key changes:

  1. Changed base class from LCToolComponent to Component
  2. Added text output capability through fetch_content_text method
  3. Modified Data objects to include required text field for message formatting
  4. Simplified error handling to match component pattern
  5. Removed TavilySearchSchema and build_tool functionality

This change makes the component more consistent with other similar components in the codebase while maintaining the same core search functionality.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 24, 2024
@github-actions github-actions bot added the refactor Maintenance tasks and housekeeping label Dec 24, 2024
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Dec 24, 2024
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Dec 24, 2024
@github-actions github-actions bot added refactor Maintenance tasks and housekeeping and removed refactor Maintenance tasks and housekeeping labels Dec 24, 2024
@ogabrielluiz
Copy link
Contributor

@Cristhianzl this will probably break front end tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Maintenance tasks and housekeeping size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants