Skip to content

Conversation

@goshanraj-g
Copy link
Contributor

Description

This integration allows LlamaIndex to use the Tavily extract function from the Tavily API to extract raw content from specific URLs.

Changes Made

  • ✅ Added extract() method to TavilyToolSpec for extracting raw content from URLs
  • ✅ Updated spec_functions to include both "search" and "extract" methods
  • ✅ Added comprehensive unit tests (10 unit tests total) with proper mocking
  • ✅ Updated README.md with detailed extract function documentation and examples
  • ✅ Enhanced example notebook with extract function demonstration
  • ✅ Bumped version from 0.4.1 to 0.4.2
  • ✅ Fixed docstring formatting to follow Python conventions

New Package?

Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

  • Yes
  • No

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.

  • I added new unit tests to cover this change
  • I believe this change is already covered by existing unit tests

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran uv run make format; uv run make lint to appease the lint gods

Testing Results

All 10 tests pass:

  • test_class - Inheritance verification
  • test_spec_functions - Function specification validation
  • test_init - Initialization with API key
  • test_search - Search functionality
  • test_search_with_default_max_results - Default parameters
  • test_extract - Extract functionality
  • test_extract_with_defaults - Extract default parameters
  • test_extract_empty_results - Empty results handling
  • test_extract_missing_fields - Missing field handling
  • test_extract_no_results_key - Error condition handling

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 7, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 7, 2025
@logan-markewich
Copy link
Collaborator

Feel free to ignore the failing check, gotta investigate whats up there

@logan-markewich logan-markewich merged commit 2b6bcbe into run-llama:main Oct 8, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants