XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Update internet.py

bc79969e
H Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -2
Modified g4f/gui/server/internet.py +2 -2
@@ -97,9 +97,9 @@ async def fetch_and_scrape(session: ClientSession, url: str, max_words: int = No
97 97 async def search(query: str, n_results: int = 5, max_words: int = 2500, add_text: bool = True) -> SearchResults:
98 98 if not has_requirements:
99 99 raise MissingRequirementsError('Install "duckduckgo-search" and "beautifulsoup4" package')
100 async with DDGS() as ddgs:
100 with DDGS() as ddgs:
101 101 results = []
102 for result in await ddgs.atext(
102 for result in ddgs.text(
103 103 query,
104 104 region="wt-wt",
105 105 safesearch="moderate",