Commit graph

25 commits

Author SHA1 Message Date
hlohaus
da6c00e2a2 Refactor Cloudflare and LMArena providers to enhance authentication handling and improve WebSocket communication 2025-10-30 21:34:45 +01:00
hlohaus
efae5a57fc Update Video provider 2025-08-11 11:38:11 +02:00
hlohaus
c718011cb8 Add YouTube provider 2025-07-14 08:49:12 +02:00
hlohaus
7f6b528e44 Fix generate video 2025-07-12 09:18:20 +02:00
hlohaus
3c66fa114a feat: add 'transparent' image model and refactor HAR provider auth flow
- Added "transparent" to `image_models` in `PollinationsAI` and mapped it to "gptimage"
- Modified transparent flag handling in `_generate_image` call in `PollinationsAI`
- Removed unused `cls.get_models()` call from image generation method in `PollinationsAI`
- Replaced `AsyncGeneratorProvider` with `AsyncAuthedProvider` in `HarProvider`
- Implemented `on_auth_async` in `HarProvider` to support browser-based auth via `nodriver`
- Replaced `create_async_generator` with `create_authed` in `HarProvider` to support `AuthResult`
- Removed custom `headers` in HAR post requests; used `auth_result.get_dict()` for `StreamSession`
- Refactored `Video` provider to support optional search in `get_response`
- Added `search` parameter to `RequestConfig.get_response` and `Video.create_async_generator`
- Improved browser automation and element interaction logic in `Video` provider
- Extracted video request interception to collect URLs using `nodriver`
- Reduced video polling loop timeout from 600 to 300 iterations in `Video`
- Updated CLI `client.py` to fix handling of `conversation.conversation` assignment
- Fixed argparse config: removed `nargs='?'` and added `metavar` for `--conversation-file`
- Improved image metadata extraction in API and backend when Pillow is available
- Modified `ImageResponse.__str__` to output HTML anchor/image tags with dimensions if present
- Added support for returning `target_path` from `copy_media` if `return_target` is True
- Changed default image processing size in `process_image` from 800x400 to 400x400
- Disabled RGBA-to-RGB flattening in `process_image`
- Improved `get_args_from_nodriver` to ensure proper referer and cookie handling
- Added helper `get_target_paths_and_urls` in `Api` to extract image dimensions from disk paths
2025-07-11 01:46:32 +02:00
hlohaus
9665da9d61 fix: improve browser handling, prompt encoding, and data merging
- In `Grok.py`, replaced `browser.main_tab` with `await browser.get(cls.url)` to ensure correct page initialization
- Reordered page actions in `Grok.py` by invoking `await page.reload()` after attaching request handler
- In `Video.py`, modified prompt encoding by applying `.encode()[:100].decode("utf-8", "ignore").strip()` to handle non-UTF-8 characters safely
- Replaced single try block for clicking "Create" button with retry loop (up to 60 attempts), including exception handling and fallback browser stop
- In `client.py`, changed model assignment logic to check `self.provider is None` before overwriting existing value
- Updated conversation data merging logic in `client.py` to preserve existing `self.data` using dictionary unpacking instead of overwriting completely
2025-07-10 04:37:04 +02:00
hlohaus
ffb1914cbe Improve update script 2025-06-19 21:02:52 +02:00
hlohaus
295103f224 Improve update script 2025-06-19 15:24:49 +02:00
hlohaus
1c88f71f05 Improve update script 2025-06-19 15:00:57 +02:00
hlohaus
9f941ae71b Support timeout in backend_api 2025-06-19 12:18:53 +02:00
hlohaus
6f9b9aeb35 Support timeout in backend_api 2025-06-19 11:42:52 +02:00
hlohaus
d0ef02a825 Support timeout in backend_api 2025-06-19 11:32:59 +02:00
hlohaus
c27f0c995e Support timeout in backend_api 2025-06-19 11:29:54 +02:00
hlohaus
4c387c9220 Update video provider 2025-06-19 10:16:45 +02:00
hlohaus
04b59558b4 Update video provider 2025-06-19 10:04:43 +02:00
hlohaus
d824d77d65 feat: Refactor PollinationsAI and ARTA provider structure
- Updated `PollinationsAI.py` to strip trailing periods and newlines from the prompt before encoding.
- Modified the encoding of the prompt to remove trailing percent signs after URL encoding.
- Simplified the audio response handling in `PollinationsAI.py` by removing unnecessary checks and yielding chunks directly.
- Renamed `ARTA.py` to `deprecated/ARTA.py` and updated import paths accordingly in `__init__.py`.
- Changed the `working` status of the `ARTA` class to `False` to indicate it is deprecated.
- Enhanced the `Video` class in `Video.py` to include aspect ratio handling and improved URL response caching.
- Updated the `RequestConfig` class to use a dictionary for storing URLs associated with prompts.
- Removed references to the `ARTA` provider in various files, including `models.py` and `any_provider.py`.
- Adjusted the `best_provider` assignments in `models.py` to exclude `ARTA` and include `HuggingFaceMedia` where applicable.
- Updated the response handling in `Video.py` to yield cached responses when available.
2025-06-19 00:42:41 +02:00
hlohaus
a354a2e8f8 Update copy_image 2025-06-18 00:06:49 +02:00
hlohaus
0d8234bc77 Update Video API 2025-06-17 20:36:44 +02:00
hlohaus
41bb5d7512 Fix video api 2025-06-17 18:53:52 +02:00
hlohaus
849789ee22 Fix video api 2025-06-17 18:50:30 +02:00
hlohaus
e8d7fccfb4 Fix video api 2025-06-17 18:20:45 +02:00
hlohaus
db1a9adb34 Update video link 2025-06-17 17:57:20 +02:00
H Lohaus
0c7842a351
Update Video.py 2025-06-17 16:53:19 +02:00
hlohaus
4631083693 Add video provider 2025-06-17 16:42:32 +02:00
hlohaus
b7d1a03dfc Add video provider 2025-06-17 16:30:00 +02:00