feat: update Exa integration with tracking header and current API params#1312
Open
tgonzalezc5 wants to merge 1 commit intokhoj-ai:masterfrom
Open
feat: update Exa integration with tracking header and current API params#1312tgonzalezc5 wants to merge 1 commit intokhoj-ai:masterfrom
tgonzalezc5 wants to merge 1 commit intokhoj-ai:masterfrom
Conversation
- Add x-exa-integration: khoj tracking header to search and contents requests - Replace deprecated numSentences/highlightsPerUrl with maxCharacters - Remove deprecated livecrawl param from contents endpoint - Add unit tests for Exa search and webpage reading Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
x-exa-integration: khojtracking header to bothsearch_with_exa()andread_webpage_with_exa()for API usage attributionnumSentences/highlightsPerUrlhighlights parameters withmaxCharactersper current Exa API docslivecrawlparameter from the contents endpoint (omitting it preserves the same fallback behavior)Usage
No configuration changes required. Existing
EXA_API_KEYenv var continues to work as before.Files changed
src/khoj/processor/tools/online_search.py-- updated Exa API headers and request paramstests/test_exa_search.py-- new unit tests for Exa search and webpage readingTest plan
x-exa-integration: khojheader is sent in search requestsx-exa-integration: khojheader is sent in contents requestsmaxCharactersis used instead of deprecatednumSentences/highlightsPerUrllivecrawlparam is no longer sent in contents requests