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

XFEstudio/gpt4free

fix: update LMArena URLs to point to arena.ai

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

代码差异

1 个文件 +6 -6
Modified g4f/Provider/needs_auth/LMArena.py +6 -6
@@ -88,10 +88,10 @@ if has_nodriver:
88 88
89 89 class LMArena(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
90 90 label = "LMArena"
91 url = "https://lmarena.ai"
91 url = "https://arena.ai"
92 92 share_url = None
93 create_evaluation = "https://lmarena.ai/nextjs-api/stream/create-evaluation"
94 post_to_evaluation = "https://lmarena.ai/nextjs-api/stream/post-to-evaluation/{id}"
93 create_evaluation = "https://arena.ai/nextjs-api/stream/create-evaluation"
94 post_to_evaluation = "https://arena.ai/nextjs-api/stream/post-to-evaluation/{id}"
95 95 working = True
96 96 active_by_default = True
97 97 use_stream_timeout = False
@@ -370,7 +370,7 @@ class LMArena(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
370 370 files = []
371 371 if not media:
372 372 return files
373 url = "https://lmarena.ai/?chat-modality=image"
373 url = "https://arena.ai/?chat-modality=image"
374 374 async with StreamSession(**args, ) as session:
375 375
376 376 for index, (_file, file_name) in enumerate(media):
@@ -389,7 +389,7 @@ class LMArena(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
389 389 extension, file_type = detect_file_type(data_bytes)
390 390 file_name = file_name or f"file-{len(data_bytes)}{extension}"
391 391 # async with session.post(
392 # url="https://lmarena.ai/?chat-modality=image",
392 # url="https://arena.ai/?chat-modality=image",
393 393 # json=[],
394 394 # headers={
395 395 # "accept": "text/x-component",
@@ -402,7 +402,7 @@ class LMArena(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
402 402 # await raise_for_status(response)
403 403
404 404 async with session.post(
405 url="https://lmarena.ai/?chat-modality=image",
405 url="https://arena.ai/?chat-modality=image",
406 406 json=[file_name, file_type],
407 407 headers={
408 408 "accept": "text/x-component",