Commit graph

28 commits

Author SHA1 Message Date
hlohaus
f6309cb693 Refactor OpenaiTemplate to remove API key print statement; update model providers by removing Blackbox references; enhance error handling in raise_for_status_async to handle JSON decoding errors gracefully. 2025-10-02 03:12:36 +02:00
hlohaus
4f8456623d Fix error logging format in provider model retrieval and improve message handling in raise_for_status 2025-09-10 09:09:53 +02:00
hlohaus
2bb58a18be Enhance LMArena provider to handle image responses and raise MissingRequirementsError for missing auth files 2025-09-06 19:02:11 +02:00
hlohaus
b49d71db7c Auth on Cloudflare error 2025-07-15 23:43:55 +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
90ef870345 fix: update provider integrations, recipient logic, and auth handling
- In **FreeRouter.py**, change the `working` flag from `False` to `True`.
- In **LMArenaProvider.py**, replace the `.rstrip("▌")` call with a manual check that, if the content ends with `▌`, slices off the trailing characters.
- In **hf_space/__init__.py**, update the async generator call to pass the `media` parameter instead of `images`.
- In **OpenaiChat.py**:
  - Modify the citation replacement regex to use `[0-9]+` (supporting any turn number) instead of a hardcoded `0`.
  - Replace `fields.is_recipient` boolean checks with comparisons against `fields.recipient == "all"` for processing text and metadata.
  - Add a new branch to process `/message/metadata/content_references` for adding source links.
  - Update the conversation initialization by replacing `self.is_recipient` with setting `self.recipient` to `"all"`.
  - Change the auth check from using `cls._api_key` to checking `cls.request_config.access_token`.
- In **chat.v1.js**, adjust the QR code URL assignment to use `window.conversation_id` if available, else default to `/qrcode`.
- In **raise_for_status.py**, update error handling by replacing `ResponseStatusError` with `MissingAuthError` for 403 responses detected as OpenAI Bot.
2025-04-17 03:26:50 +02:00
hlohaus
cb5acc2df5 Fix error in raise_for_status 2025-03-28 14:01:04 +01:00
hlohaus
7db18c2a2f Insert buckets as content part
Fix copy button for code results
Use crypto for uuids in UI
2025-03-28 12:17:10 +01:00
H Lohaus
d740942ccb
Update raise_for_status.py 2025-03-26 14:08:09 +01:00
hlohaus
2d1d579f79 Fix video stream 2025-03-26 05:05:16 +01:00
hlohaus
ce500f0d49 Set default model in HuggingFaceMedia
Improve handling of shared chats
Show api_key input if required
2025-03-26 01:32:05 +01:00
hlohaus
8eaaf5db95 Add HuggingFaceMedia provider with Video Generation
Add Support for Video Response in UI
Improve Support for Audio Response in UI
Fix ModelNotSupported errors in HuggingSpace providers
2025-03-23 05:27:52 +01:00
hlohaus
14817cdd66 Audio model support in PollinationsAI
Allow Fullscreen for Youtube in Gemini
2025-03-06 23:19:57 +01:00
hlohaus
eb4e90e8ee Add support for crewai, Fix infinity run in OpenaiChat 2025-03-06 20:13:18 +01:00
hlohaus
4e12f048b1 Add langchain integration 2025-02-27 12:25:41 +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
cad308108c Support TitleGeneration, Reasoning in HuggingChat
Improve model list in HuggingSpace, PollinationsAI
Fix Image Generation in PollinationsAI
Add Image Upload in PollinationsAI
Support Usage, FinishReason,  jsonMode in PollinationsAI
Add Reasoning to Web UI
Fix using provider api_keys in Web UI
2025-01-23 23:16:12 +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
H Lohaus
86e36efe6b
Add Path and PathLike support when uploading images (#2514)
* Add Path and PathLike support when uploading images
Improve raise_for_status in special cases
Move ImageResponse to providers.response module
Improve OpenaiChat and OpenaiAccount providers
Add Sources for web_search in OpenaiChat
Add JsonConversation for import and export conversations to js
Add RequestLogin response type
Add TitleGeneration support in OpenaiChat and gui
* Improve Docker Container Guide in README.md
* Add tool calls api support, add search tool support
2024-12-28 16:50:08 +01:00
H Lohaus
bbb858249b
Improve gradient in gui, show only models with enabled providers (#2492)
- **Cloudflare Provider**: Added error handling for missing requirements when fetching arguments.
- **Copilot Provider**: Updated the prompt formatting to use a maximum length function, improving message handling.
- **PollinationsAI Provider**: Adjusted the prompt length to a maximum of 5000 characters.
- **GitHub Copilot Provider**: Updated to use `ClientSession` for better session management.
- **CSS Updates**: Enhanced the gradient styling in the GUI for a more visually appealing interface.
- **JavaScript Updates**: Added functionality to toggle search options in the chat interface.
2024-12-17 21:17:40 +01:00
Heiner Lohaus
3b7b79f5ba Fix show html in gui 2024-12-15 12:23:04 +01:00
Heiner Lohaus
78c20c08a0 Improve image generation in OpenaiChat and Gemini 2024-12-06 21:54:13 +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
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
8f3fbee0d8 Add show log option to gui 2024-11-19 15:26:03 +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
Heiner Lohaus
1e2cf48cba Add authless OpenaiChat 2024-04-05 21:00:35 +02:00
Heiner Lohaus
b7eee50930 Move raise_for_status, Create FormData wrapper 2024-03-15 14:55:53 +01:00