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

XFEstudio/gpt4free

Update (g4f/Provider/Blackbox.py)

d9892ceb
kqlio67 <kqlio67@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -2
Modified g4f/Provider/Blackbox.py +2 -2
@@ -181,7 +181,7 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin):
181 181 model (str): Model to use for generating responses.
182 182 messages (Messages): Message history.
183 183 proxy (Optional[str]): Proxy URL, if needed.
184 web_search_mode (bool): Enables or disables web search mode.
184 websearch (bool): Enables or disables web search mode.
185 185 **kwargs: Additional keyword arguments.
186 186
187 187 Yields:
@@ -298,7 +298,7 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin):
298 298 else:
299 299 yield cleaned_response
300 300 else:
301 if web_search_mode:
301 if websearch:
302 302 match = re.search(r'\$~~~\$(.*?)\$~~~\$', cleaned_response, re.DOTALL)
303 303 if match:
304 304 source_part = match.group(1).strip()