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

XFEstudio/gpt4free

Update leagcy LMArena

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

代码差异

1 个文件 +4 -2
Modified g4f/Provider/LegacyLMArena.py +4 -2
@@ -459,8 +459,6 @@ class LegacyLMArena(AsyncGeneratorProvider, ProviderModelMixin):
459 459 content = data
460 460
461 461 if content:
462 if "**NETWORK ERROR DUE TO HIGH TRAFFIC." in content:
463 raise ResponseError(data)
464 462 # Clean up content
465 463 if isinstance(content, str):
466 464 if content.endswith("▌"):
@@ -488,6 +486,8 @@ class LegacyLMArena(AsyncGeneratorProvider, ProviderModelMixin):
488 486 continue
489 487
490 488 if content and content != returned_data and content != '<span class="cursor"></span> ':
489 if "**NETWORK ERROR DUE TO HIGH TRAFFIC." in content:
490 raise ResponseError(data)
491 491 if content.endswith("▌"):
492 492 content = content[:-1]
493 493 new_content = content
@@ -499,6 +499,8 @@ class LegacyLMArena(AsyncGeneratorProvider, ProviderModelMixin):
499 499 elif isinstance(output_data[1], str) and output_data[1]:
500 500 # Direct string content
501 501 content = output_data[1]
502 if "**NETWORK ERROR DUE TO HIGH TRAFFIC." in content:
503 raise ResponseError(data + " #2")
502 504 if content != returned_data:
503 505 if content.endswith("▌"):
504 506 content = content[:-1]