summaryrefslogtreecommitdiffstats
path: root/g4f/gui/server
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-11-16 13:12:02 +0100
committerGitHub <noreply@github.com>2024-11-16 13:12:02 +0100
commitbc79969e5cdaae2c704cfe5e4a3deb58e380d24c (patch)
treec9e700591fb812d14932902218f919dc011aec72 /g4f/gui/server
parentUpdate asyncio.py (diff)
downloadgpt4free-bc79969e5cdaae2c704cfe5e4a3deb58e380d24c.tar
gpt4free-bc79969e5cdaae2c704cfe5e4a3deb58e380d24c.tar.gz
gpt4free-bc79969e5cdaae2c704cfe5e4a3deb58e380d24c.tar.bz2
gpt4free-bc79969e5cdaae2c704cfe5e4a3deb58e380d24c.tar.lz
gpt4free-bc79969e5cdaae2c704cfe5e4a3deb58e380d24c.tar.xz
gpt4free-bc79969e5cdaae2c704cfe5e4a3deb58e380d24c.tar.zst
gpt4free-bc79969e5cdaae2c704cfe5e4a3deb58e380d24c.zip
Diffstat (limited to 'g4f/gui/server')
-rw-r--r--g4f/gui/server/internet.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/gui/server/internet.py b/g4f/gui/server/internet.py
index 9d15878b..1e366e46 100644
--- a/g4f/gui/server/internet.py
+++ b/g4f/gui/server/internet.py
@@ -97,9 +97,9 @@ async def fetch_and_scrape(session: ClientSession, url: str, max_words: int = No
async def search(query: str, n_results: int = 5, max_words: int = 2500, add_text: bool = True) -> SearchResults:
if not has_requirements:
raise MissingRequirementsError('Install "duckduckgo-search" and "beautifulsoup4" package')
- async with DDGS() as ddgs:
+ with DDGS() as ddgs:
results = []
- for result in await ddgs.atext(
+ for result in ddgs.text(
query,
region="wt-wt",
safesearch="moderate",