From ccac427ac139653e838fff18741bf232036766bb Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Wed, 6 Mar 2024 17:41:17 +0100 Subject: Fiy unittests with duckduckgo-search 5.0 --- g4f/gui/server/internet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g4f/gui/server/internet.py') diff --git a/g4f/gui/server/internet.py b/g4f/gui/server/internet.py index e784e52d..a1fafa7d 100644 --- a/g4f/gui/server/internet.py +++ b/g4f/gui/server/internet.py @@ -101,7 +101,7 @@ async def search(query: str, n_results: int = 5, max_words: int = 2500, add_text raise MissingRequirementsError('Install "duckduckgo-search" and "beautifulsoup4" package') async with AsyncDDGS() as ddgs: results = [] - async for result in ddgs.text( + for result in await ddgs.text( query, region="wt-wt", safesearch="moderate", -- cgit v1.2.3