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

XFEstudio/gpt4free

Refactor import statement for StreamSession and improve debug log message formatting

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

代码差异

1 个文件 +2 -2
Modified g4f/Provider/needs_auth/LMArena.py +2 -2
@@ -30,7 +30,7 @@ except ImportError:
30 30
31 31 from ...typing import AsyncResult, Messages, MediaListType
32 32 from ...requests import get_args_from_nodriver, raise_for_status, merge_cookies
33 from ...requests.aiohttp import StreamSession
33 from ...requests import StreamSession
34 34 from ...errors import ModelNotFoundError, CloudflareError, MissingAuthError, MissingRequirementsError, \
35 35 RateLimitError
36 36 from ...providers.response import FinishReason, Usage, JsonConversation, ImageResponse, Reasoning, PlainTextResponse, \
@@ -603,7 +603,7 @@ class LMArena(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
603 603 elif line.startswith("a3:"):
604 604 raise RuntimeError(f"LMArena: {json.loads(line[3:])}")
605 605 else:
606 debug.log(f"LMArena: Unknown line prefix: {line}")
606 debug.log(f"LMArena: Unknown line prefix: {line[:2]}")
607 607 break
608 608 except (CloudflareError, MissingAuthError) as error:
609 609 args = None