Commit Graph

224 Commits

Author SHA1 Message Date
kqlio67
b198d900aa
update providers and documentation with image handling improvements (#2451)
* refactor(g4f/Provider/Airforce.py): Enhance Airforce provider with dynamic model fetching

* refactor(g4f/Provider/Blackbox.py): Enhance Blackbox AI provider configuration and streamline code

* feat(g4f/Provider/RobocodersAPI.py): Add RobocodersAPI new async chat provider

* refactor(g4f/client/__init__.py): Improve provider handling in async_generate method

* refactor(g4f/models.py): Update provider configurations for multiple models

* refactor(g4f/Provider/Blackbox.py): Streamline model configuration and improve response handling

* feat(g4f/Provider/DDG.py): Enhance model support and improve conversation handling

* refactor(g4f/Provider/Copilot.py): Enhance Copilot provider with model support

* refactor(g4f/Provider/AmigoChat.py): update models and improve code structure

* chore(g4f/Provider/not_working/AIUncensored.): move AIUncensored to not_working directory

* chore(g4f/Provider/not_working/Allyfy.py): remove Allyfy provider

* Update (g4f/Provider/not_working/AIUncensored.py g4f/Provider/not_working/__init__.py)

* refactor(g4f/Provider/ChatGptEs.py): Implement format_prompt for message handling

* refactor(g4f/Provider/Blackbox.py): Update message formatting and improve code structure

* refactor(g4f/Provider/LLMPlayground.py): Enhance text generation and error handling

* refactor(g4f/Provider/needs_auth/PollinationsAI.py): move PollinationsAI to needs_auth directory

* refactor(g4f/Provider/Liaobots.py): Update Liaobots provider models and aliases

* feat(g4f/Provider/DeepInfraChat.py): Add new DeepInfra models and aliases

* Update (g4f/Provider/__init__.py)

* Update (g4f/models.py)

* g4f/models.py

* Update g4f/models.py

* Update g4f/Provider/LLMPlayground.py

* Update (g4f/models.py g4f/Provider/Airforce.py
g4f/Provider/__init__.py g4f/Provider/LLMPlayground.py)

* Update g4f/Provider/__init__.py

* refactor(g4f/Provider/Airforce.py): Enhance text generation with retry and timeout

* Update g4f/Provider/AmigoChat.py g4f/Provider/__init__.py

* refactor(g4f/Provider/Blackbox.py): update model prefixes and image handling

Fixes #2445

- Update model prefixes for gpt-4o, gemini-pro, and claude-sonnet-3.5
- Add 'gpt-3.5-turbo' alias for 'blackboxai' model
- Modify image handling in create_async_generator method
- Add 'imageGenerationMode' and 'webSearchModePrompt' flags to API request
- Remove redundant 'imageBase64' field from image data structure

* New provider (g4f/Provider/Blackbox2.py)

Support for model llama-3.1-70b text generation

* docs(docs/async_client.md): update AsyncClient API guide with minor improvements

- Improve formatting and readability of code examples
- Add line breaks for better visual separation of sections
- Fix minor typos and inconsistencies in text
- Enhance clarity of explanations in various sections
- Remove unnecessary whitespace

* feat(docs/client.md): add response_format parameter

- Add 'response_format' parameter to image generation examples
- Specify 'url' format for standard image generation
- Include 'b64_json' format for base64 encoded image response
- Update documentation to reflect new parameter usage
- Improve code examples for clarity and consistency

* docs(README.md): update usage examples and add image generation

- Update text generation example to use new Client API
- Add image generation example with Client API
- Update configuration section with new cookie setting instructions
- Add response_format parameter to image generation example
- Remove outdated information and reorganize sections
- Update contributors list

* refactor(g4f/client/__init__.py): optimize image processing and response handling

- Modify _process_image_response to handle 'url' format without local saving
- Update ImagesResponse construction to include 'created' timestamp
- Simplify image processing logic for different response formats
- Improve error handling and logging for image generation
- Enhance type hints and docstrings for better code clarity

* feat(g4f/models.py): update model providers and add new models

- Add Blackbox2 to Provider imports
- Update gpt-3.5-turbo best provider to Blackbox
- Add Blackbox2 to llama-3.1-70b best providers
- Rename dalle_3 to dall_e_3 and update its best providers
- Add new models: solar_mini, openhermes_2_5, lfm_40b, zephyr_7b, neural_7b, mythomax_13b
- Update ModelUtils.convert with new models and changes
- Remove duplicate 'dalle-3' entry in ModelUtils.convert

* refactor(Airforce): improve API handling and add authentication

- Implement API key authentication with check_api_key method
- Refactor image generation to use new imagine2 endpoint
- Improve text generation with better error handling and streaming
- Update model aliases and add new image models
- Enhance content filtering for various model outputs
- Replace StreamSession with aiohttp's ClientSession for async operations
- Simplify model fetching logic and remove redundant code
- Add is_image_model method for better model type checking
- Update class attributes for better organization and clarity

* feat(g4f/Provider/HuggingChat.py): update HuggingChat model list and aliases

Request by @TheFirstNoob
- Add 'Qwen/Qwen2.5-72B-Instruct' as the first model in the list
- Update model aliases to include 'qwen-2.5-72b'
- Reorder existing models in the list for consistency
- Remove duplicate entry for 'Qwen/Qwen2.5-72B-Instruct' in models list

* refactor(g4f/Provider/ReplicateHome.py): remove unused text models

Request by @TheFirstNoob
- Removed the 'meta/meta-llama-3-70b-instruct' and 'mistralai/mixtral-8x7b-instruct-v0.1' text models from the  list
- Updated the  list to only include the remaining text and image models
- This change simplifies the model configuration and reduces the number of available models, focusing on the core text and image models provided by Replicate

* refactor(g4f/Provider/HuggingChat.py): Move HuggingChat to needs_auth directory

Request by @TheFirstNoob

* Update (g4f/Provider/needs_auth/HuggingChat.py)

* Update g4f/models.py

* Update g4f/Provider/Airforce.py

* Update g4f/models.py g4f/Provider/needs_auth/HuggingChat.py

* Added 'Airforce' provider to the 'o1-mini' model (g4f/models.py)

* Update (g4f/Provider/Airforce.py g4f/Provider/AmigoChat.py)

* Update g4f/models.py g4f/Provider/DeepInfraChat.py g4f/Provider/Airforce.py

* Update g4f/Provider/DeepInfraChat.py

* Update (g4f/Provider/DeepInfraChat.py)

* Update g4f/Provider/Blackbox.py

* Update (docs/client.md docs/async_client.md g4f/client/__init__.py)

* Update (docs/async_client.md docs/client.md)

* Update (g4f/client/__init__.py)

---------

Co-authored-by: kqlio67 <kqlio67@users.noreply.github.com>
Co-authored-by: kqlio67 <>
Co-authored-by: H Lohaus <hlohaus@users.noreply.github.com>
2024-12-05 01:07:59 +01:00
H Lohaus
79c407b939
IterListProvider support for generating images (#2441)
* IterListProvider support for generating images
* Add missing get_har_files import in Copilot
* Fix typo in dall-e-3 model name
* Add image client unittests
* Add MicrosoftDesigner provider
* Import MicrosoftDesigner and add it to the model list
2024-11-29 13:56:11 +01:00
kqlio67
8d5d522c4e
feat(g4f): Major provider updates and new model support (#2437)
* refactor(g4f/Provider/Airforce.py): Enhance Airforce provider with dynamic model fetching

* refactor(g4f/Provider/Blackbox.py): Enhance Blackbox AI provider configuration and streamline code

* feat(g4f/Provider/RobocodersAPI.py): Add RobocodersAPI new async chat provider

* refactor(g4f/client/__init__.py): Improve provider handling in async_generate method

* refactor(g4f/models.py): Update provider configurations for multiple models

* refactor(g4f/Provider/Blackbox.py): Streamline model configuration and improve response handling

* feat(g4f/Provider/DDG.py): Enhance model support and improve conversation handling

* refactor(g4f/Provider/Copilot.py): Enhance Copilot provider with model support

* refactor(g4f/Provider/AmigoChat.py): update models and improve code structure

* chore(g4f/Provider/not_working/AIUncensored.): move AIUncensored to not_working directory

* chore(g4f/Provider/not_working/Allyfy.py): remove Allyfy provider

* Update (g4f/Provider/not_working/AIUncensored.py g4f/Provider/not_working/__init__.py)

* refactor(g4f/Provider/ChatGptEs.py): Implement format_prompt for message handling

* refactor(g4f/Provider/Blackbox.py): Update message formatting and improve code structure

* refactor(g4f/Provider/LLMPlayground.py): Enhance text generation and error handling

* refactor(g4f/Provider/needs_auth/PollinationsAI.py): move PollinationsAI to needs_auth directory

* refactor(g4f/Provider/Liaobots.py): Update Liaobots provider models and aliases

* feat(g4f/Provider/DeepInfraChat.py): Add new DeepInfra models and aliases

* Update (g4f/Provider/__init__.py)

* Update (g4f/models.py)

* g4f/models.py

* Update g4f/models.py

* Update g4f/Provider/LLMPlayground.py

* Update (g4f/models.py g4f/Provider/Airforce.py g4f/Provider/__init__.py g4f/Provider/LLMPlayground.py)

* Update g4f/Provider/__init__.py

* Update (g4f/Provider/Airforce.py)

---------

Co-authored-by: kqlio67 <kqlio67@users.noreply.github.com>
2024-11-28 17:50:24 +01:00
kqlio67
ea346971df
New RobocodersAPI provider with providers enhancement and client updates (#2388)
* refactor(g4f/Provider/Airforce.py): Enhance Airforce provider with dynamic model fetching

* refactor(g4f/Provider/Blackbox.py): Enhance Blackbox AI provider configuration and streamline code

* feat(g4f/Provider/RobocodersAPI.py): Add RobocodersAPI new async chat provider

* refactor(g4f/client/__init__.py): Improve provider handling in async_generate method

* refactor(g4f/models.py): Update provider configurations for multiple models

* refactor(g4f/Provider/Blackbox.py): Streamline model configuration and improve response handling

---------

Co-authored-by: kqlio67 <kqlio67@users.noreply.github.com>
2024-11-20 09:51:29 +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
Tekky
6ac545445a minor improvements for release 2024-11-15 11:58:58 +01:00
Tekky
66d3cecc59 Ai4Chat not working 2024-11-15 11:24:56 +01:00
Tekky
2341b7ef9d Update models.py
Liaobots and Darkai do not work for gpt-3.5-turbo
2024-11-15 11:13:51 +01:00
kqlio67
9cb6083277 Update (g4f/models.py) 2024-11-13 14:50:49 +02:00
kqlio67
4e606a4916 Update (g4f/models.py g4f/Provider/PerplexityLabs.py) 2024-11-12 20:56:23 +02:00
kqlio67
330d920e4e Update (g4f/models.py g4f/Provider/ReplicateHome.py) 2024-11-12 20:50:15 +02:00
kqlio67
2574101570 Update (g4f/models.py g4f/Provider/PerplexityLabs.py) 2024-11-12 20:04:00 +02:00
kqlio67
fde29c53e8 feat(g4f/Provider/HuggingChat.py: Enhance HuggingChat provider functionality 2024-11-12 09:04:33 +02:00
kqlio67
19af1654cd Removed provider (g4f/Provider/ChatifyAI.py) 2024-11-11 20:43:12 +02:00
kqlio67
618bb78fe9 Removed provider (g4f/Provider/AiMathGPT.py) 2024-11-11 20:30:37 +02:00
kqlio67
82b8c22b0b Update (g4f/models.py g4f/Provider/airforce/AirforceChat.py docs/providers-and-models.md) 2024-11-11 20:21:03 +02:00
kqlio67
8e8410c898 Update (g4f/models.py g4f/Provider/Cloudflare.py) 2024-11-11 19:16:02 +02:00
kqlio67
3a15957d22 Update (g4f/models.py g4f/Provider/airforce/AirforceChat.py docs/providers-and-models.md) 2024-11-09 23:44:52 +02:00
kqlio67
db347ef097 Update (g4f/models.py g4f/Provider/airforce/ g4f/Provider/Airforce.py) 2024-11-08 19:20:21 +02:00
kqlio67
18b309257c Update (g4f/models.py g4f/Provider/ docs/providers-and-models.md) 2024-11-06 21:53:18 +02:00
kqlio67
e98793d0a7 Update (g4f/models.py g4f/Provider/ docs/providers-and-models.md) 2024-11-06 17:25:09 +02:00
kqlio67
8e1a544d55 Update (docs/providers-and-models.md g4f/models.py g4f/gui/client/index.html g4f/Provider/Cloudflare.py) 2024-11-06 13:56:33 +02:00
kqlio67
3da7a14a72 The provider is disconnected due to a Cloudflare issue. (g4f/Provider/ChatgptFree.py) 2024-11-05 16:02:39 +02:00
kqlio67
75549df2ba Provider removed (g4f/Provider/ChatHub.py) 2024-11-05 14:02:38 +02:00
kqlio67
ade7a2f0df Update (g4f/models.py g4f/Provider/ChatGpt.py) 2024-11-05 00:55:26 +02:00
kqlio67
e73792d7c1 Update (g4f/models.py) 2024-11-04 19:08:39 +02:00
kqlio67
8c7791aae3 Update (docs/providers-and-models.md g4f/models.py g4f/Provider/GizAI.py) 2024-11-04 15:37:04 +02:00
kqlio67
e1b1312902 Disconnected provider (g4f/Provider/AmigoChat.py) 2024-11-02 13:50:28 +02:00
kqlio67
42aba60ece Update (g4f/Provider/AIUncensored.py) 2024-11-01 22:53:15 +02:00
kqlio67
11bec81dc4 Update (g4f/Provider/Airforce.py) 2024-11-01 18:01:29 +02:00
kqlio67
e6627d8d30 The prefix function has been removed 2024-10-30 16:25:55 +02:00
kqlio67
6e72483617 feat(g4f/models.py): add versioning support for model retrieval 2024-10-30 14:10:57 +02:00
kqlio67
b80c397e16 Update (g4f/models.py) 2024-10-30 12:41:29 +02:00
kqlio67
8768a05753 Update (docs/providers-and-models.md g4f/models.py g4f/Provider/nexra/) 2024-10-27 20:14:45 +02:00
kqlio67
cc0ed0481e feat(g4f/models.py): add new provider GizAI and update best providers 2024-10-26 18:54:47 +03:00
kqlio67
51a4135388 Updated docs/providers-and-models.md g4f/models.py g4f/Provider/Upstage.py 2024-10-22 17:19:46 +03:00
kqlio67
e10d5ed557 Updated docs/providers-and-models.md g4f/models.py 2024-10-22 17:13:25 +03:00
kqlio67
5a79d8cbd7 Restored provider (g4f/Provider/nexra/NexraSDLora.py) 2024-10-22 15:27:01 +03:00
kqlio67
b08249ecd5 Restored provider (g4f/Provider/nexra/NexraSDTurbo.py) 2024-10-22 15:09:03 +03:00
kqlio67
144c7b4922 Restored provider (g4f/Provider/nexra/NexraSD15.py) 2024-10-22 14:50:33 +03:00
kqlio67
3e7bee6741 Updated (g4f/models.py) 2024-10-22 13:25:34 +03:00
kqlio67
f939bbfa1a Updated (g4f/models.py) 2024-10-22 12:51:01 +03:00
kqlio67
af86a44c96 Updated (g4f/models.py) 2024-10-21 22:03:26 +03:00
kqlio67
6a3684a7b2 Restored provider (g4f/Provider/nexra/NexraBing.py) 2024-10-21 20:01:10 +03:00
kqlio67
fe5717878f Update (main.py g4f/models.py) 2024-10-21 10:42:39 +03:00
kqlio67
d10f5d6b4d 1 2024-10-21 10:32:32 +03:00
kqlio67
d1a28b5352 Temporarily disconnected provider (g4f/Provider/nexra/NexraBlackbox.py) 2024-10-20 23:49:24 +03:00
kqlio67
ac783e505b Restore the provider (g4f/Provider/nexra/NexraBlackbox.py) 2024-10-20 23:39:21 +03:00
kqlio67
8f85553a59 update g4f/models.py g4f/Provider/Ai4Chat.py g4f/Provider/Chatgpt4Online.py 2024-10-20 20:33:14 +03:00
kqlio67
6c629fd2c6 Update (g4f/models.py) 2024-10-20 14:28:28 +03:00