Commit graph

3450 commits

Author SHA1 Message Date
hlohaus
2c59301013 Secure api 2025-06-19 14:08:41 +02:00
hlohaus
a323981e72 Serve broken images 2025-06-19 13:47:20 +02:00
hlohaus
4485758781 Improve logging 2025-06-19 13:38:32 +02:00
hlohaus
0b2e38e1bd Improve logging 2025-06-19 13:28:08 +02:00
hlohaus
8ebe05499b Improve logging 2025-06-19 13:15:10 +02:00
hlohaus
98c973ca36 Improve logging 2025-06-19 13:07:04 +02:00
hlohaus
a2a1d63836 Improve logging 2025-06-19 12:57:12 +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
90262b1f6a Fix copy image 2025-06-19 10:40:36 +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
aa92c2225e Fix missing import 2025-06-19 06:29:26 +02:00
hlohaus
4337fa7fa8 Add user log 2025-06-19 06:19:54 +02:00
hlohaus
6120c791a9 fix: Update header fallback for last-modified date in copy_images.py
- In g4f/image/copy_images.py, modified the line that retrieves the "date" header
- Changed from `date = response.headers.get("date")` to `date = response.headers.get("last-modified", response.headers.get("date"))` to fallback to "date" if "last-modified" is missing
- No other files or functions were modified besides this line
2025-06-19 02:23:35 +02:00
hlohaus
989d3b8602 fix: remove redundant lookup for "audio" voice in PollinationsAI.py and fix key reference in OpenaiTemplate.py
- Removed the line retrieving "voice" from "audio" key inside the PollinationsAI.py file
- Changed the condition in OpenaiTemplate.py from checking "choices" in data to "choices" in data before accessing data["choices"][0] in OpenaiTemplate.py
2025-06-19 02:12:44 +02:00
hlohaus
2812c30987 quote_url 2025-06-19 01:17:27 +02:00
hlohaus
b5b48ae75c Fix shutdown 2025-06-19 01:04:26 +02:00
hlohaus
f5bd41c598 fix: Update reasoning statuses in ThinkingProcessor tests
- Modified `TestThinkingProcessor` unit tests in `thinking.py` to update expected results for reasoning statuses:
  - Changed `"Finished"` status to `""` in `test_thinking_end`, `test_thinking_start_and_end`, and `test_chunk_with_text_after_think`.

feat: Add model aliases to HuggingFaceMedia provider

- Imported `model_aliases` from `.models` in `HuggingFaceMedia.py`.
- Added `model_aliases` attribute to `HuggingFaceMedia` provider class.

feat: Add timeout argument to CLI API parser

- Introduced `--timeout` argument in `get_api_parser()` in `cli.py` with default value of `600` seconds.
- Passed `timeout` argument to `run_api_args()` function.
```
2025-06-19 00:48:57 +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
faf94ccfbb Update copy_image 2025-06-18 00:17:27 +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
eb27708f73
Update any_provider.py 2025-06-17 16:59: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
hlohaus
4bd1b8652c Fix copy images 2025-06-17 08:30:08 +02:00
hlohaus
c508b79765 Remove unused files 2025-06-16 21:43:02 +02:00
hlohaus
0cb3057c6e Fix show thumbnail 2025-06-16 08:29:07 +02:00
hlohaus
4cb62416b7 Fix thumbnail 2025-06-16 08:08:56 +02:00
hlohaus
992023766a Update process_image 2025-06-15 18:30:32 +02:00
hlohaus
b400052a25 Use ImageOps 2025-06-15 17:42:00 +02:00
hlohaus
be8366bb8a Update render_messages 2025-06-15 17:32:27 +02:00
hlohaus
6aff2d3b77 Update render_messages 2025-06-15 16:49:16 +02:00
hlohaus
f8b3ceee36 Fix broken thumbnails 2025-06-15 16:36:57 +02:00
hlohaus
424d44e6ed Fix broken thumbnails 2025-06-15 15:55:54 +02:00
hlohaus
6dbe827a8f Add quality=75, exif=None to save thumbnail 2025-06-15 15:16:45 +02:00
hlohaus
0b86b09a50 Fix image orintation 2025-06-15 14:23:57 +02:00
hlohaus
3024cc5c9e Support uploaded images 2025-06-15 14:17:28 +02:00
hlohaus
04f8ecd21d Enhance flux model prompts 2025-06-15 13:52:19 +02:00
hlohaus
6ae75f56dc Use ROTATE_90 2025-06-15 13:46:20 +02:00
hlohaus
cc5d0e9c85 Update process generate thumbnails 2025-06-15 12:53:12 +02:00
hlohaus
c6bfddecae Update process generate thumbnails 2025-06-15 12:48:24 +02:00