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

XFEstudio/gpt4free

Update LMArena

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

代码差异

1 个文件 +3 -0
Modified g4f/Provider/needs_auth/LMArenaBeta.py +3 -0
@@ -152,6 +152,8 @@ class LMArenaBeta(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
152 152 if cache_file.exists():
153 153 with cache_file.open("r") as f:
154 154 args = json.load(f)
155 if not args:
156 return cls.models
155 157 response = curl_cffi.get(f"{cls.url}/?mode=direct", **args)
156 158 if response.ok:
157 159 for line in response.text.splitlines():
@@ -193,6 +195,7 @@ class LMArenaBeta(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
193 195 pass
194 196 elif has_nodriver or cls.share_url is None:
195 197 async def callback(page):
198 await page.find("Ask anything…", 120)
196 199 button = await page.find("Accept Cookies")
197 200 if button:
198 201 await button.click()