feat: add Tavily as a configurable web search provider option#180
Open
tavily-integrations wants to merge 1 commit into
Open
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
TavilySearchprovider class following the existingBaseProviderpattern (mirroring DuckDuckGo/Google/Bing providers)app.pyalongside existing providerstavily-pythondependency topyproject.tomlFiles changed
src/pygpt_net/provider/web/tavily_search.py— New file: TavilySearch provider withsearch(),is_configured(),init_options(), andget_config_message()methodssrc/pygpt_net/app.py— Added import and registration of TavilySearchpyproject.toml— Addedtavily-pythondependencyDependency changes
tavily-python = "^0.5.0"to[tool.poetry.dependencies]Environment variable changes
TAVILY_API_KEY— Users configure this via thetavily_api_keyplugin setting in the Tavily tabNotes for reviewers
search_depth="basic"(1 credit per search);"advanced"(2 credits) can be exposed as a setting later if desired🤖 Generated with Claude Code
Automated Review
TavilySearchclass follows theBaseProvidercontract, theapp.pyregistration mirrors existing providers, andtavily-pythonis added topyproject.toml. Tavily SDK usage is correct (client initialization,search()call, response parsing viaresponse["results"]andresult["url"]). The lazy-import_load_tavily()pattern is consistent with the DuckDuckGo provider. Only minor issues found — no blockers.