feat: add Tavily as configurable web search provider#1302
Open
tavily-integrations wants to merge 1 commit intokhoj-ai:masterfrom
Open
feat: add Tavily as configurable web search provider#1302tavily-integrations wants to merge 1 commit intokhoj-ai:masterfrom
tavily-integrations wants to merge 1 commit intokhoj-ai:masterfrom
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
TAVILY_API_KEYenvironment variable is setFiles changed
src/khoj/processor/tools/online_search.py— AddedTAVILY_API_KEYenv var,search_with_tavily()async function using tavily-python SDK, and registered Tavily in the search engine dispatcherpyproject.toml— Addedtavily-python >= 0.5.0to project dependenciesDependency changes
tavily-python >= 0.5.0to pyproject.tomlEnvironment variable changes
TAVILY_API_KEY— set this to enable Tavily as a search providerNotes for reviewers
search_with_tavily()function normalizes results to the same{organic: [{title, link, snippet, content}]}format used by all other providersAsyncTavilyClientfor async compatibility with the existingasyncio.gatherpattern🤖 Generated with Claude Code
Automated Review
AsyncTavilyClient, maps result fields to the expected{"organic": [...]}format, registers in the dispatcher only when the API key is present, and adds the dependency to pyproject.toml. No regressions to existing providers. Three minor issues noted but none are blocking.