Repository navigation
Conversation
Member
|
Please don't open PRs soliciting new web search providers. It wouldn't be accepted |
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
Add SerpKite as an opt-in online-search provider for self-hosted Khoj. Setting
SERPKITE_API_KEYenables it in the existing provider fallback chain and web-search availability check.The async adapter POSTs to
https://api.serpkite.com/v1/searchwith Bearer authentication and a 60-second timeout. It maps SerpKite's own{request, results, meta}response into Khoj's internalorganicformat. Missing links are skipped, empty/error responses allow the existing fallback flow, and country localization followsLocationData.Queries above the API's 2,048-character limit are shortened only for the outbound request. The original query remains the returned dictionary key. Error logs contain only HTTP status, without raw response text, API keys or query contents.
Setup documentation is included. The service and adapter are maintained by the SerpKite team; I am submitting on its behalf. API docs, pricing/free account.
Validation
ruff checkpasses for all touched Python files;ruff format --checkpasses.PYTHONPATH=src python -m unittest tests.test_serpkite_search -v.Google is a trademark of Google LLC; SerpKite is not affiliated with Google.