Skip to content

fix: use auto backend for DuckDuckGoSearchRM#405

Open
majiayu000 wants to merge 1 commit intostanford-oval:mainfrom
majiayu000:fix/duckduckgo-backend-deprecation
Open

fix: use auto backend for DuckDuckGoSearchRM#405
majiayu000 wants to merge 1 commit intostanford-oval:mainfrom
majiayu000:fix/duckduckgo-backend-deprecation

Conversation

@majiayu000
Copy link

Summary

Fix the deprecated 'api' backend in DuckDuckGoSearchRM by using 'auto' backend instead.

Problem

The backend='api' option is deprecated in the duckduckgo_search library, causing the following warning:

backend='api' is deprecated, using backend='auto'

This deprecation was reported in #357.

Solution

Change self.duck_duck_go_backend = "api" to self.duck_duck_go_backend = "auto".

The 'auto' backend tries all available backends (html, lite) in random order, which provides better compatibility with the current duckduckgo_search library.

Test plan

  • Code follows black formatting
  • Minimal change with no functional impact (auto was already the fallback)

Fixes #357

The 'api' backend is deprecated in duckduckgo_search library.
Using 'auto' backend instead, which tries all available backends
(html, lite) in random order.

This fixes the deprecation warning: "backend='api' is deprecated,
using backend='auto'"

Fixes stanford-oval#357

Signed-off-by: majiayu000 <1835304752@qq.com>
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.

[BUG]Query Regarding DuckDuckGo Search API Version Compatibility Issues

1 participant