mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
feat: Add LMArenaBeta provider and update existing providers
- Introduced a new provider class `LMArenaBeta` in `g4f/Provider/LMArenaBeta.py` with capabilities for text and image models. - Updated `g4f/Provider/Cloudflare.py` to remove an unused import of `Cookies`. - Modified `g4f/Provider/PollinationsAI.py` to change the condition for checking the action in the `next` command. - Added a new provider `PuterJS` in `g4f/Provider/PuterJS.py` with various model handling and authentication logic. - Removed the old `PuterJS` implementation from `g4f/Provider/not_working/PuterJS.py`. - Updated `g4f/Provider/__init__.py` to include the new `LMArenaBeta` and `PuterJS` providers. - Changed the label of `HarProvider` in `g4f/Provider/har/__init__.py` to "LMArena (Har)". - Adjusted the model list in `g4f/Provider/openai/models.py` to ensure consistency in model definitions. - Updated the API response handling in `g4f/providers/response.py` to calculate total tokens in the `Usage` class constructor.
This commit is contained in:
parent
cb840e3cdf
commit
c6fead0313
17 changed files with 602 additions and 1319 deletions
|
|
@ -46,10 +46,10 @@ class Api:
|
|||
"label": model.split(":")[-1] if provider.__name__ == "AnyProvider" else model,
|
||||
"default": model == provider.default_model,
|
||||
"vision": model in provider.vision_models,
|
||||
"audio": model in provider.audio_models,
|
||||
"audio": False if provider.audio_models is None else model in provider.audio_models,
|
||||
"video": model in provider.video_models,
|
||||
"image": model in provider.image_models,
|
||||
"count": provider.models_count.get(model),
|
||||
"count": False if provider.models_count is None else provider.models_count.get(model),
|
||||
}
|
||||
if provider in Provider.__map__:
|
||||
provider = Provider.__map__[provider]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue