Commit graph

5 commits

Author SHA1 Message Date
hlohaus
c6fead0313 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.
2025-05-29 03:42:17 +02:00
hlohaus
ca08db5897 refactor: Update PuterJS provider and models
* Update PuterJS provider to set `working` to `False` and `return_conversation` to `True`
* Update `PuterJS` class to raise `RateLimitError` instead of yielding error messages
* Update `PuterJS` class to raise `RuntimeError` instead of yielding error messages for authentication and other exceptions
* Remove `PuterJS` as the best provider for various models and replace with other providers
* Update `DeepSeekAPI` to include `model_aliases` for "deepseek-chat"
* Update `openai/models.py` to include "o4-mini" and "o4-mini-high" in `text_models`
* Remove `PuterJS` from the list of providers in `g4f/models.py`
* Update `ModelUtils` to remove `PuterJS` from the list of models
2025-05-25 09:16:25 +02:00
hlohaus
e238ca3a58 refactor: update model mappings, error handling, and file utils
- Changed `generate_commit_message` return to `.strip("`").strip()` in `commit.py`
- Added new model mappings in `PollinationsAI.py`, including `gpt-4.1`, `gpt-4.1-mini`, and `deepseek-r1-distill-*`
- Removed `print` debug statement from `PollinationsAI.py` request payload
- Replaced temp file handling in `MarkItDown.py` with `get_tempfile` utility
- Added `get_tempfile` function to `files.py` for consistent tempfile creation
- Added `gpt-4.1` to `text_models` list in `models.py`
- Added `ModelNotSupportedError` to exception handling in `OpenaiChat.py`
- Updated message content creation to use `to_string()` in `OpenaiChat.py`
- Wrapped `get_model()` in try-except to ignore `ModelNotSupportedError` in `OpenaiChat.py`
- Adjusted `convert` endpoint in `api/__init__.py` to accept optional `provider` param
- Refactored `/api/markitdown` to reuse `convert()` handler in `api/__init__.py
2025-04-26 17:50:48 +02:00
hlohaus
963e0104ad Add gpt-4.5 model 2025-02-28 09:36:15 +01:00
hlohaus
167ceedd31 Update model list in OpenaiChat (o3-mini, o3-mini-high)
Add Reasoning to OpenaiChat provider
Check for pipeline_tag in HuggingChat providers
Add image preview in PollinationsAI
Add input of custom Model in GUI
2025-02-02 23:03:59 +01:00