Commit Graph

255 Commits

Author SHA1 Message Date
Heiner Lohaus
315a2f2595 Add streaming and system messages support in Airforce 2024-12-14 23:34:13 +01:00
H Lohaus
a591c5d409
Add Clarity Token to Copilot, (#2482)
* Add Clarity Token to Copilot,
Ignore disabled providers in gui,
Read cookie files after upload
* Add more chat templates to HuggingFace
2024-12-14 19:56:36 +01:00
H Lohaus
335c971f6a
Add multiple images support (#2478)
* Add multiple images support

* Add multiple images support in gui

* Support multiple images in legacy client and in the api
Fix some model names in provider model list

* Fix unittests

* Add vision and providers docs
2024-12-13 22:20:58 +01:00
kqlio67
bb9132bcb4
Updating provider documentation and small fixes in providers (#2469)
* refactor(g4f/Provider/Airforce.py): improve model handling and filtering

- Add hidden_models set to exclude specific models
- Add evil alias for uncensored model handling
- Extend filtering for model-specific response tokens
- Add response buffering for streamed content
- Update model fetching with error handling

* refactor(g4f/Provider/Blackbox.py): improve caching and model handling

- Add caching system for validated values with file-based storage
- Rename 'flux' model to 'ImageGeneration' and update references
- Add temperature, top_p and max_tokens parameters to generator
- Simplify HTTP headers and remove redundant options
- Add model alias mapping for ImageGeneration
- Add file system utilities for cache management

* feat(g4f/Provider/RobocodersAPI.py): add caching and error handling

- Add file-based caching system for access tokens and sessions
- Add robust error handling with specific error messages
- Add automatic dialog continuation on resource limits
- Add HTML parsing with BeautifulSoup for token extraction
- Add debug logging for error tracking
- Add timeout configuration for API requests

* refactor(g4f/Provider/DarkAI.py): update DarkAI default model and aliases

- Change default model from llama-3-405b to llama-3-70b
- Remove llama-3-405b from supported models list
- Remove llama-3.1-405b from model aliases

* feat(g4f/Provider/Blackbox2.py): add image generation support

- Add image model 'flux' with dedicated API endpoint
- Refactor generator to support both text and image outputs
- Extract headers into reusable static method
- Add type hints for AsyncGenerator return type
- Split generation logic into _generate_text and _generate_image methods
- Add ImageResponse handling for image generation results

BREAKING CHANGE: create_async_generator now returns AsyncGenerator instead of AsyncResult

* refactor(g4f/Provider/ChatGptEs.py): update ChatGptEs model configuration

- Update models list to include gpt-3.5-turbo
- Remove chatgpt-4o-latest from supported models
- Remove model_aliases mapping for gpt-4o

* feat(g4f/Provider/DeepInfraChat.py): add Accept-Language header support

- Add Accept-Language header for internationalization
- Maintain existing header configuration
- Improve request compatibility with language preferences

* refactor(g4f/Provider/needs_auth/Gemini.py): add ProviderModelMixin inheritance

- Add ProviderModelMixin to class inheritance
- Import ProviderModelMixin from base_provider
- Move BaseConversation import to base_provider imports

* refactor(g4f/Provider/Liaobots.py): update model details and aliases

- Add version suffix to o1 model IDs
- Update model aliases for o1-preview and o1-mini
- Standardize version format across model definitions

* refactor(g4f/Provider/PollinationsAI.py): enhance model support and generation

- Split generation logic into dedicated image/text methods
- Add additional text models including sur and claude
- Add width/height parameters for image generation
- Add model existence validation
- Add hasattr checks for model lists initialization

* chore(gitignore): add provider cache directory

- Add g4f/Provider/.cache to gitignore patterns

* refactor(g4f/Provider/ReplicateHome.py): update model configuration

- Update default model to gemma-2b-it
- Add default_image_model configuration
- Remove llava-13b from supported models
- Simplify request headers

* feat(g4f/models.py): expand provider and model support

- Add new providers DarkAI and PollinationsAI
- Add new models for Mistral, Flux and image generation
- Update provider lists for existing models
- Add P1 and Evil models with experimental providers

BREAKING CHANGE: Remove llava-13b model support

* refactor(Airforce): Update type hint for split_message return

- Change return type of  from  to  for consistency with import.
- Maintain overall functionality and structure of the  class.
- Ensure compatibility with type hinting standards in Python.

* refactor(g4f/Provider/Airforce.py): Update type hint for split_message return

- Change return type of 'split_message' from 'list[str]' to 'List[str]' for consistency with import.
- Maintain overall functionality and structure of the 'Airforce' class.
- Ensure compatibility with type hinting standards in Python.

* feat(g4f/Provider/RobocodersAPI.py): Add support for optional BeautifulSoup dependency

- Introduce a check for the BeautifulSoup library and handle its absence gracefully.
- Raise a  if BeautifulSoup is not installed, prompting the user to install it.
- Remove direct import of BeautifulSoup to avoid import errors when the library is missing.

* fix: Updating provider documentation and small fixes in providers

* Disabled the provider (RobocodersAPI)

* Fix: Conflicting file g4f/models.py

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

* Update docs/providers-and-models.md g4f/models.py g4f/Provider/Airforce.py g4f/Provider/PollinationsAI.py

* Update docs/providers-and-models.md

* Update .gitignore

* Update g4f/models.py

* Update g4f/Provider/PollinationsAI.py

---------

Co-authored-by: kqlio67 <>
2024-12-09 16:52:25 +01:00
H Lohaus
76c3683403
Remove webview js api, Add unittest for provider has model, Use cooki… (#2470)
* Remove webview js api, Add unittest for provider has model, Use cookies dir for cache
2024-12-08 20:39:40 +01:00
Heiner Lohaus
1bfb36176c Add more flux dev image providers 2024-12-08 04:13:09 +01:00
Heiner Lohaus
54a6d91cfc Fix animation in lightbox 2024-12-07 23:54:51 +01:00
Heiner Lohaus
eff97ed344 Show only enabled models in gui 2024-12-07 22:50:28 +01:00
Heiner Lohaus
6a624acf55 Use custom user data dir for each provider
Reuse cookies and access token in Copilot
Send in the gui messages to multiple providers at once
Add GUI documenation
2024-12-07 19:38:04 +01:00
Heiner Lohaus
fc4fe21199 Add Authentication Setup Guide 2024-12-07 03:01:43 +01:00
Heiner Lohaus
78c20c08a0 Improve image generation in OpenaiChat and Gemini 2024-12-06 21:54:13 +01:00
Heiner Lohaus
c0e09eded0 Fix cookies loading in cli, fix default Chatgpt provider 2024-12-06 01:43:49 +01:00
Heiner Lohaus
b202958c02 Update discord link 2024-12-05 17:53:47 +01:00
Heiner Lohaus
e2c269cc63 Add cookies to HuggingChat provider 2024-12-05 01:20:26 +01:00
H Lohaus
3f93d34cbf
Add more contributers, add link to Swagger UI (#2443)
* Add more contributers, add link to Swagger UI
* Update Dockerfile-slim
* Update retry_provider.py
* Add html preview to gui, fix urls in website manifest
* Missing chunks in OpenaiChat
2024-11-30 22:11:18 +01:00
Heiner Lohaus
651df0cf82 Add some arguments to chat completion api, update discord links 2024-11-27 14:44:24 +01:00
Heiner Lohaus
4ae3d98df8 Sort .har files by date, filter None from result 2024-11-26 19:28:41 +01:00
Heiner Lohaus
cab71ca8b6 Add duckduckgo-search to slim requirements,
Add pass provider as model in the client,
Fix missing @property in version utils
2024-11-26 16:36:45 +01:00
Heiner Lohaus
6b48af1757 Add armv7 docker image, Remove Bing provider, add update banner 2024-11-25 20:34:50 +01:00
Heiner Lohaus
46038c6a20 Add .har file support for Copilot
Update provider in Vision documentation
Hide
2024-11-25 13:27:56 +01:00
H Lohaus
804a80bc7c
Arm2 (#2414)
* Fix arm v7 build / improve api

* Update stubs.py

* Fix unit tests
2024-11-24 17:43:45 +01:00
H Lohaus
f36e6a2e3b
Fix provider api response (#2408)
* Update __init__.py

* Update __init__.py

* Update Gemini.py

* Update Gemini.py

* Update Gemini.py

* Update Gemini.py

* Update internet.py
2024-11-24 13:30:10 +01:00
H Lohaus
e8bd24a25b
Add speech synthesize from Gemini (#2404)
* 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 created with all async helpers

* Add speech synthesize from Gemini. You can use it without a account
2024-11-22 01:50:48 +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
6f2b6cccbd Add upload cookie files 2024-11-21 07:14:36 +01:00
H Lohaus
eae317a166
Support synthesize in Openai generator (#2394)
* Improve download of generated images, serve images in the api

* Add support for conversation handling in the api

* Add orginal prompt to image response

* Add download images option in gui, fix loading model list in Airforce

* Support speech synthesize in Openai generator
2024-11-21 05:00:08 +01:00
H Lohaus
ffb4b0d162
Improve download of generated images, serve images in the api (#2391)
* Improve download of generated images, serve images in the api
Add support for conversation handling in the api

* Add orginal prompt to image response

* Add download images option in gui, fix loading model list in Airforce

* Add download images option in gui, fix loading model list in Airforce
2024-11-20 19:58:16 +01:00
H Lohaus
c959d9b469
Update api.py 2024-11-20 10:12:54 +01:00
Heiner Lohaus
58fa409eef Add Cerebras and HuggingFace2 provider, Fix RubiksAI provider
Add support for image generation in Copilot provider
2024-11-20 02:34:47 +01:00
Heiner Lohaus
1fe59623b2 Add image upload to Copilot provider
Add --cookie-browsers argument to cli
2024-11-19 20:26:00 +01:00
Heiner Lohaus
e57b221c34 Fix aliases to gui arguments 2024-11-19 17:32:42 +01:00
Heiner Lohaus
6e674ca33d Add aliases to gui arguments, fix logs variable 2024-11-19 17:25:40 +01:00
Heiner Lohaus
8f3fbee0d8 Add show log option to gui 2024-11-19 15:26:03 +01:00
Heiner Lohaus
7f1b8c9c60 Fix generate messages on error in gui 2024-11-19 11:35:02 +01:00
Heiner Lohaus
b79a4d6aeb Ask for auth on image upload 2024-11-19 10:39:22 +01:00
Heiner Lohaus
7c10a036ed Add image upload to Copilot provider
Remove prompt lock from gui
Fix discord link in gui
2024-11-19 10:23:24 +01:00
Heiner Lohaus
f1ef23285a Fix load model list i AirforceChat provider
Add Microsoft Copilot provider
Show image support in the model list of the gui
2024-11-18 15:41:45 +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
H Lohaus
bc79969e5c
Update internet.py 2024-11-16 13:12:02 +01:00
H Lohaus
9e4a63e74b
Update internet.py 2024-11-15 18:25:54 +01:00
H Lohaus
0f81b61739
Update internet.py 2024-11-15 18:23:07 +01:00
H Lohaus
d53db73248
Update internet.py 2024-11-15 18:21:22 +01:00
H Lohaus
9da45f9a63
Update internet.py 2024-11-15 18:19:14 +01:00
H Lohaus
427a72eff3
Update internet.py 2024-11-15 18:17:43 +01:00
H Lohaus
075c3f8c2a
Update index.html 2024-11-15 18:02:00 +01:00
Tekky
f65ebd9851
Merge pull request #2313 from kqlio67/main
Major Provider Updates and Documentation Restructuring
2024-11-15 11:18:56 +01:00
foxfire52
f38428ab23
Improve logging implementation (#2347) 2024-11-15 07:38:51 +01:00
kqlio67
d2f36d5ac3 Update (g4f/gui/client/index.html) 2024-11-09 20:08:17 +02:00
kqlio67
58b4a19efe Update (g4f/gui/client/index.html) 2024-11-06 14:07:24 +02:00