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

XFEstudio/gpt4free

fix(g4f/Provider/Blackbox.py): Improve Blackbox AI response text processing

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

代码差异

1 个文件 +2 -0
Modified g4f/Provider/Blackbox.py +2 -0
@@ -189,6 +189,8 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin):
189 189 yield image_response
190 190 return
191 191
192 response_text = re.sub(r'Generated by BLACKBOX.AI, try unlimited chat https://www.blackbox.ai', '', response_text, flags=re.DOTALL)
193
192 194 json_match = re.search(r'\$~~~\$(.*?)\$~~~\$', response_text, re.DOTALL)
193 195 if json_match:
194 196 search_results = json.loads(json_match.group(1))