Skip to content

Conversation

umar-mq
Copy link

@umar-mq umar-mq commented Apr 1, 2025

Add support for changing the search engine and introduce DuckDuckGo as an option.

  • Base Class for Search Engines

    • Add BaseSearchAPI class to handle common search API functionality.
    • Update SerperAPI to inherit from BaseSearchAPI.
  • DuckDuckGo Search Engine

    • Add DuckDuckGoAPI class for DuckDuckGo search engine support.
    • Implement get_sources method in DuckDuckGoAPI to fetch search results.
  • OpenDeepSearchAgent Updates

    • Add search_engine parameter to OpenDeepSearchAgent to select the search engine.
    • Update OpenDeepSearchAgent to initialize the selected search engine based on search_engine parameter.
    • Update search_and_build_context and ask methods to use the selected search engine.

…her search engine

Add support for changing the search engine and introduce DuckDuckGo as an option.

* **Base Class for Search Engines**
  - Add `BaseSearchAPI` class to handle common search API functionality.
  - Update `SerperAPI` to inherit from `BaseSearchAPI`.

* **DuckDuckGo Search Engine**
  - Add `DuckDuckGoAPI` class for DuckDuckGo search engine support.
  - Implement `get_sources` method in `DuckDuckGoAPI` to fetch search results.

* **OpenDeepSearchAgent Updates**
  - Add `search_engine` parameter to `OpenDeepSearchAgent` to select the search engine.
  - Update `OpenDeepSearchAgent` to initialize the selected search engine based on `search_engine` parameter.
  - Update `search_and_build_context` and `ask` methods to use the selected search engine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant