feat: add Tavily search provider to core search utility#1056
Open
tavily-integrations wants to merge 1 commit intoScrapeGraphAI:mainfrom
Open
feat: add Tavily search provider to core search utility#1056tavily-integrations wants to merge 1 commit intoScrapeGraphAI:mainfrom
tavily-integrations wants to merge 1 commit intoScrapeGraphAI:mainfrom
Conversation
This file contains hidden or 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
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.
Summary
research_web.py, alongside existing providers (DuckDuckGo, Bing, SearXNG, Serper)tavily_api_keyparameter or falls back toTAVILY_API_KEYenvironment variableChanges
scrapegraphai/utils/research_web.pyosimport for environment variable fallbacktavily_api_keyfield toSearchConfigPydantic model'tavily'to thevalid_enginesset invalidate_search_enginetavily_api_keyparameter tosearch_on_web()function signature and docstringelif config.search_engine == "tavily"dispatch branch insearch_on_web()_search_tavily()helper function usingTavilyClientfromtavily-pythonpyproject.tomltavily-python>=0.3.0to project dependenciesDependency changes
tavily-python>=0.3.0topyproject.tomlEnvironment variable changes
TAVILY_API_KEY— used as fallback whentavily_api_keyis not explicitly passedNotes for reviewers
tavily-pythonimport is done lazily inside_search_tavily()to avoid import errors if the package isn't installed, with a clear error message guiding installationsearch_depth="basic"for cost efficiency (1 credit per call); can be changed to"advanced"for higher relevance🤖 Generated with Claude Code
Automated Review