138 Commits

Author SHA1 Message Date
hlohaus
acffc939cf Fix ddgs search 2025-07-13 12:55:59 +02:00
hlohaus
51b4b8bcb3 feat: add model alias handling and update Cloudflare provider
- Introduced `clean_name` function in `Cloudflare.py` to format model names by removing specific suffixes.
- Updated `model_aliases` in `Cloudflare` class with new model mappings, and cleaned up redundant entries.
- Set `models` in the `Cloudflare` class to use keys from `model_aliases`.
- Adjusted the caching logic in `Cloudflare` to include new headers for requests.
- Added `parent` and `login_url` attributes in `DeepInfraChat` class.
- Updated `PollinationsAI` to clean up model retrieval logic and fixed handling of existing checks.
- Refactored `HarProvider` to inherit models and aliases from `LegacyLMArena`.
- Implemented loading environment variables from `.env` file in `cookies.py`.
- Updated default headers in `defaults.py` for user agent and `sec-ch-ua`.
- Cleaned up various model references in `any_model_map.py` to reflect differences in audio, vision, and other model types.
- Added a more centralized handling for API key management in `run_tools.py` to accommodate new nomenclature.
- Enhanced existing logic to allow for more granular loading and utilization of API keys from environment variables.
2025-07-10 03:28:02 +02:00
hlohaus
eff8624ed0 Add g4f cli client 2025-06-29 03:57:47 +02:00
hlohaus
350a07693a Fix typo inference 2025-06-27 16:49:36 +02:00
hlohaus
1b5942c51f Use tempfile if cookies dir is not writeable 2025-06-14 12:29:49 +02:00
H Lohaus
856a63e66d Update setup.py 2025-06-13 04:38:00 +02:00
hlohaus
5734a06193 feat: Enhance PollinationsAI with new models and media handling
- Updated `PollinationsAI.py` to import `quote` and `ClientTimeout` from `aiohttp`.
- Added `MissingAuthError` to error imports in `PollinationsAI.py`.
- Included `AudioResponse` in response imports in `PollinationsAI.py`.
- Expanded `image_models` in `PollinationsAI` to include "turbo" and "gptimage".
- Changed the initialization of `image_models` to use `cls.image_models.copy()`.
- Introduced `download_media` parameter in the `_generate_image` method.
- Added a condition to set `n = 1` if the model is "gptimage".
- Renamed `get_image_url` to `get_url_with_seed` and modified its logic to return the URL for "gptimage".
- Updated the session creation in `_generate_image` to include a timeout.
- Enhanced error handling in the image fetching logic to yield `Reasoning` status.
- Modified the media handling in `save_response_media` to yield `AudioResponse` based on `download_media`.
- Updated `OpenAIFM.py` to include `quote` and `AudioResponse` imports.
- Added `styles` to the `OpenAIFM` class and created a method to group models.
- Introduced `download_media` parameter in the `synthesize` method of `OpenAIFM`.
- Updated the `create_app` function in `api/__init__.py` to check for `a2wsgi` availability.
- Removed unused file handling routes in `api/__init__.py`.
- Updated `secure_filename` function in `files.py` to handle encoding more robustly.
- Added `download_media` to the `RequestConfig` model in `stubs.py`.
2025-06-12 08:37:42 +02:00
hlohaus
bf4ed09ab9 feat: Refactor extra_body handling and update model error handling
- Changed the default value of `extra_body` from an empty dictionary to `None` in `ImageLabs` and `PollinationsAI` classes.
- Added a check to initialize `extra_body` to an empty dictionary if it is `None` in the `ImageLabs` class.
- Removed the `extra_image_models` list from the `PollinationsAI` class.
- Updated the way image models are combined in the `PollinationsAI` class to avoid duplicates.
- Changed the error handling for unsupported models from `ModelNotSupportedError` to `ModelNotFoundError` in multiple classes including `OpenaiChat`, `HuggingFaceAPI`, and `HuggingFaceInference`.
- Updated the `save_response_media` function to handle both string and bytes responses.
- Adjusted the handling of audio data in the `PollinationsAI` class to ensure proper processing of audio responses.
2025-06-12 02:29:41 +02:00
hlohaus
93986d15f6 fix: resolve model duplication and improve provider handling
- Fixed duplicate model entries in Blackbox provider model_aliases
- Added meta-llama- to llama- name cleaning in Cloudflare provider
- Enhanced PollinationsAI provider with improved vision model detection
- Added reasoning support to PollinationsAI provider
- Fixed HuggingChat authentication to include headers and impersonate
- Removed unused max_inputs_length parameter from HuggingFaceAPI
- Renamed extra_data to extra_body for consistency across providers
- Added Puter provider with grouped model support
- Enhanced AnyProvider with grouped model display and better model organization
- Fixed model cleaning in AnyProvider to handle more model name variations
- Added api_key handling for HuggingFace providers in AnyProvider
- Added see_stream helper function to parse event streams
- Updated GUI server to handle JsonConversation properly
- Fixed aspect ratio handling in image generation functions
- Added ResponsesConfig and ClientResponse for new API endpoint
- Updated requirements to include markitdown
2025-05-16 00:18:12 +02:00
hlohaus
796d6d6e14 Fix errors on read buckets
Update requirements for docx
2025-02-19 17:10:03 +01:00
hlohaus
9524c3f327 Add AsyncAuthedProvider in Copilot
Add orginal url to downloaded image
Support ssl argument in StreamSession
Report Provider and Errors in RetryProvider
Support ssl argument in OpenaiTemplate
Remove model duplication in OpenaiChat
Disable ChatGpt provider and remove it from models.py
Update slim requirements
Support provider names as model name in Image generation
Add model qwen-2.5-1m-demo to models.py
2025-01-28 20:33:50 +01:00
hlohaus
ef9dcfa66b Fix generate Images with OpenaiChat
Add "flux"as alias in HuggingSpace providers
Choice a random space provider in HuggingSpace provider
Add "Selecting a Provider" Documentation
Update requirements list in pypi packages
Fix label of CablyAI and DeepInfraChat provider
2025-01-24 17:49:07 +01:00
hlohaus
ae978ad541 Add missing webview requirements
Fix web_search in Web UI
2025-01-15 22:45:52 +01:00
Heiner Lohaus
13b6fdef98 Add files requirements 2025-01-05 20:20:25 +01:00
Heiner Lohaus
7893a0835e Add filessupport, scrape and refine your data
Remove Webdriver usages
Add continue messages for other providers
2025-01-01 04:20:02 +01:00
Heiner Lohaus
486190d838 Fix links in Readme 2024-12-07 05:25:33 +01:00
Heiner Lohaus
7f8e5181f2 Fix links in Readme, update OpenaiChat provider 2024-12-07 05:06:24 +01:00
H Lohaus
8f0528d877 Update setup.py 2024-11-23 09:54:03 +01:00
H Lohaus
431db7b8ea Update api / add a synthesize and upload_cookies endpoint (#2406)
* Add web_search function to OpenaiChat provider
* GithubCopilot provider added, it need a api_key
* Remove nodriver login in Gemini synthesize

* Update api / add a synthesize and upload_cookies endpoint
2024-11-23 00:17:35 +01:00
H Lohaus
e4bfd9db5c Improve slim docker image example, clean up OpenaiChat provider (#2397)
* Improve slim docker image example, clean up OpenaiChat provider

* Enhance event loop management for asynchronous generators

* Fix attribute " shutdown_default_executor" not found in old python versions

* asyncio file added with all async helpers
2024-11-21 14:05:50 +01:00
Heiner Lohaus
ea1448001d Add nodriver to Gemini provider,
Add slim docker image with google-chrome usage,
Add the new docker images to publish worklow,
Update requirements.txt and pip requirements
2024-11-17 11:06:37 +01:00
H Lohaus
6ce493d4df Fix api streaming, fix AsyncClient (#2357)
* Fix api streaming, fix AsyncClient, Improve Client class, Some providers fixes, Update models list, Fix some tests, Update model list in Airforce provid
er, Add OpenAi image generation url to api, Fix reload and debug in api arguments, Fix websearch in gui

* Fix Cloadflare and Pi and AmigoChat provider

* Fix conversation support in DDG provider, Add cloudflare bypass with nodriver

* Fix unittests without curl_cffi
2024-11-16 13:19:51 +01:00
foxfire52
f38428ab23 Improve logging implementation (#2347) 2024-11-15 07:38:51 +01:00
kqlio67
711f2f097e feat(setup.py): update dependencies and extras_require 2024-10-11 09:18:52 +03:00
Heiner Lohaus
65bcc8ae8b Some small fixes 2024-04-10 14:23:30 +02:00
Heiner Lohaus
d0da5900c4 Fix attr conversation_id not found 2024-03-27 19:04:00 +01:00
Heiner Lohaus
92358bd896 Update min requirements, Add pycryptodome 2024-03-25 21:19:13 +01:00
Heiner Lohaus
2ee724f93e Add webview docs and examples, Set webview as default 2024-03-22 12:48:59 +01:00
H Lohaus
79bc56f36e Merge pull request #1726 from hlohaus/giga
Bug fixes and android support
2024-03-19 18:59:42 +01:00
Heiner Lohaus
486e43dabd Fix missing websocket_request_id in OpenaiChat
Add RateLimitErrors to Bing
Add android support to gui api
Add annotations import to gui api
2024-03-19 18:48:32 +01:00
abc
502ed74dcd ~ | include /local/models dir on pip 2024-03-19 12:41:30 +00:00
H Lohaus
6ef282de3a Remove all not working provider (#1679)
Fix many providers
Add selenium-wire to requierments
2024-03-12 02:06:06 +01:00
abc
c2642e8b05 ~ 2024-03-11 12:20:25 +00:00
Heiner Lohaus
ccac427ac1 Fiy unittests with duckduckgo-search 5.0 2024-03-06 17:41:17 +01:00
Heiner Lohaus
51264fe20c Add GeminiPro API provider
Set min version for undetected-chromedriver
Add api_key to the new client
2024-02-23 11:33:38 +01:00
Heiner Lohaus
e5b7f72b71 Move some modules, create providers dir
Set min version for duckduckgo
Make duckduckgo search async
Remove get_lastet_version
2024-02-22 00:16:58 +01:00
Heiner Lohaus
23e002f52f Fix OpenaiChat provider, Fix issue with curl_cffi 2024-02-09 06:36:28 +01:00
H Lohaus
5627cd913e Update setup.py 2024-01-31 21:36:47 +01:00
H Lohaus
feb83c168b New minimum requirements (#1515)
* New minimum requirements
* Add ConversationStyleOptionSets to Bing
* Add image.ImageRequest
* Improve python version support
* Improve unittests
2024-01-26 07:54:13 +01:00
H Lohaus
42709f55b2 Fix unittests (#1472)
* Fix unittests

* Fix missing distutils, install setuptools

* Fix version not found

* Remove deprecation in get_event_loop
2024-01-14 16:37:21 +01:00
H Lohaus
d632190f1d Merge branch 'main' into main 2024-01-13 15:52:52 +01:00
Heiner Lohaus
ea8d6b847a Support upload image in gui
Add image upload to OpenaiChat
Add image response to OpenaiChat
Improve ChatGPT Plus Support
Remove unused requirements
2024-01-13 15:37:36 +01:00
Akash Mondal
c2115309ab Cleanup unused dependencies
* remove packages, that are not a direct dependency to this project, from requirements.txt

* no need to just numpy for simple sqrt operation on numbers

* write code on python than using a js compiler
2024-01-13 18:31:28 +05:30
Heiner Lohaus
a7c8565922 Add publish-to-pypi workflow
Improve gui frontend
Fix web search in bing
2024-01-12 02:14:35 +01:00
abc
ee6317a38d ~ | g4f v-0.1.9.9 2024-01-08 14:35:56 +01:00
abc
b31274a24a ~ | g4f v-0.1.9.8 2024-01-03 23:49:16 +01:00
abc
ab80fdeee2 ~ | g4f v-0.1.9.7 2023-12-28 13:40:57 +00:00
abc
fb021362d8 ~ | g4f v-0.1.9.6 2023-12-24 13:32:54 +01:00
abc
a5e6ab798f ~ | g4f v-0.1.9.5 2023-12-22 21:16:37 +01:00
abc
b615a95a41 ~ | g4f v-0.1.9.4 2023-12-16 10:34:25 +01:00