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

XFEstudio/gpt4free

Add raise_for_status in share auth

9defe08a
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

2 个文件 +2 -0
Modified g4f/Provider/EasyChat.py +1 -0
@@ -106,6 +106,7 @@ class EasyChat(OpenaiTemplate, AuthFileMixin):
106 106 "model": model,
107 107 "provider": cls.__name__
108 108 })
109 response.raise_for_status()
109 110 text, *sub = response.text.split("\n" * 10 + "<!--", 1)
110 111 if sub:
111 112 debug.log("Save args to cache file:", str(cache_file))
Modified g4f/Provider/needs_auth/LMArenaBeta.py +1 -0
@@ -190,6 +190,7 @@ class LMArenaBeta(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
190 190 "model": model,
191 191 "provider": cls.__name__
192 192 })
193 response.raise_for_status()
193 194 text, *args = response.text.split("\n" * 10 + "<!--", 1)
194 195 if args:
195 196 debug.log("Save args to cache file:", str(cache_file))