返回提交历史
Modified
g4f/Provider/needs_auth/LMArena.py
+3
-1
Modified
g4f/providers/base_provider.py
+2
-2
XFEstudio/gpt4free
fix: Remove video models from LMArena provider and update model handling in base provider
d98d8b5f
代码差异
2 个文件
+5
-3
@@ -111,7 +111,7 @@ class LMArena(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
111
111
"video" in model["capabilities"]["outputCapabilities"]}
112
112
cls.vision_models = [model["publicName"] for model in models_data if
113
113
"image" in model["capabilities"]["inputCapabilities"]]
114
cls.models = list(cls.text_models) + list(cls.image_models) + list(cls.video_models)
114
cls.models = list(cls.text_models) + list(cls.image_models)
115
115
cls.default_model = list(cls.text_models.keys())[0]
116
116
cls._models_loaded = True
117
117
@@ -488,6 +488,8 @@ class LMArena(AsyncGeneratorProvider, ProviderModelMixin, AuthFileMixin):
488
488
model_id = cls.text_models[model]
489
489
elif model in cls.image_models:
490
490
model_id = cls.image_models[model]
491
elif model in cls.video_models:
492
model_id = cls.video_models[model]
491
493
else:
492
494
raise ModelNotFoundError(f"Model '{model}' is not supported by LMArena provider.")
493
495
@@ -28,13 +28,13 @@ from .. import debug
28
28
29
29
SAFE_PARAMETERS = [
30
30
"model", "messages", "stream", "timeout",
31
"proxy", "media", "response_format",
31
"media", "response_format",
32
32
"prompt", "negative_prompt", "tools", "conversation",
33
33
"history_disabled",
34
34
"temperature", "top_k", "top_p",
35
35
"frequency_penalty", "presence_penalty",
36
36
"max_tokens", "stop",
37
"api_key", "base_url", "seed", "width", "height",
37
"api_key", "seed", "width", "height",
38
38
"max_retries", "web_search", "cache",
39
39
"guidance_scale", "num_inference_steps", "randomize_seed",
40
40
"safe", "enhance", "private", "aspect_ratio", "n", "transparent"