Feature/search providers refactor #897
Open
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.
This pull request introduces a major enhancement to the application's search capabilities by integrating several new, powerful search and scraping providers. It also includes a significant refactoring of the MetaSearchAgent to create a more modular, extensible, and maintainable architecture.
Users can now choose from a variety of search backends, including Exa, Tavily, Firecrawl, and Jina AI, in addition to the existing SearXNG. This allows for more flexible and specialized information retrieval depending on the user's needs.
The core search logic has been decoupled from the specific provider implementations, making it much easier to add new providers in the future.
Key Changes
New Search Providers Added:
Modular Search Provider Framework:
Defined a common SearchProvider interface and specific option types for each service in src/lib/search/searchProviders/types.ts.
MetaSearchAgent Refactoring:
Its logic has been broken down into smaller, single-responsibility classes for better separation of concerns:
Configuration and Settings UI:
API and Logic Updates:
Configuration Required
To use the new search providers, update your config.toml with the following sections and provide your API keys:
Ini, TOML