3995 Commits

Author SHA1 Message Date
Ammar
861a940361 Merge branch 'xtekky:main' into main 2025-11-27 08:54:47 +02:00
H Lohaus
2e6d417d02 Update Grok.py 2025-11-26 16:19:47 +01:00
Ammar
7771cf3d43 Improve Yupp provider account handling , request timeout and get byte from url (#3249)
* Add image caching to Yupp provider

Introduces an image cache to avoid redundant uploads in the Yupp provider. Refactors media attachment handling into a new prepare_files method, improving efficiency and code organization. Updates .gitignore to exclude .idea directory.

* Refactor Yupp stream handling and chunk processing

Improves stream segmentation in the Yupp provider by introducing buffers for target, variant, quick, thinking, and extra streams. Refactors chunk processing to better handle image-gen, quick responses, and variant outputs, and adds more robust stream ID extraction and routing logic. Yields a consolidated JsonResponse with all stream segments for downstream use.

* Handle ClientResponseError in Yupp provider

Adds specific handling for aiohttp ClientResponseError in the Yupp provider. Marks account as invalid on 500 Internal Server Error, otherwise increments error count and raises ProviderException for other errors.

* Update Yupp.py

fix 429  'Too Many Requests'

* Update Yupp.py

* Improve Yupp provider account handling and request timeout

Refactored account loading to preserve account history and error counts when updating tokens. Enhanced request logic to support custom timeouts using aiohttp's ClientTimeout, allowing for more flexible timeout configuration.

* Update __init__.py

* Handle multi-line <think> and <yapp> blocks in Yupp

Added logic to capture and process multi-line <think> and <yapp class="image-gen"> blocks referenced by special IDs. Introduced block storage and extraction functions, enabling reasoning and image-gen content to be handled via references in the response stream.

* Update LMArena.py

Not Found Model error

* Refactor to use StreamSession in Qwen and Yupp providers

Replaced aiohttp.ClientSession with StreamSession in Qwen.py and Yupp.py for improved session handling. Updated exception and timeout references in Yupp.py to use aiohttp types. Improved default argument handling in StreamSession initialization.

* Update Yupp.py

* Add status parameter to get_generated_image method

Introduces a 'status' parameter to the get_generated_image method to allow passing image generation status. Updates method calls and response objects to include status in their metadata for improved tracking of image generation progress.

* Update OpenaiChat.py

* Refactor Qwen image upload and caching logic and token

Reworked the image upload flow in Qwen provider to use direct file uploads with OSS headers, added caching for uploaded images, and improved file type detection. Updated prepare_files to handle uploads via session and cache results, and added utility for generating OSS headers. Minor imports and typing adjustments included and token support.

* Refactor Qwen and Yupp providers for improved async handling

Updated Qwen provider to handle timeout via kwargs and improved type annotations. Refactored Yupp provider for better code organization, formatting, and async account rotation logic. Enhanced readability and maintainability by reordering imports, adding whitespace, and clarifying function implementations.

* Add image caching to OpenaiChat provider

Introduces an image cache mechanism to OpenaiChat for uploaded images, reducing redundant uploads and improving efficiency. Also refactors code for clarity, updates type hints, and makes minor formatting improvements throughout the file.
2025-11-26 14:02:51 +01:00
H Lohaus
32215bb7bb Merge pull request #3257 from keac/main
Improve input handling in Grok.py
2025-11-26 13:59:33 +01:00
Ammar
9d2cdf9b4d Add image caching to OpenaiChat provider
Introduces an image cache mechanism to OpenaiChat for uploaded images, reducing redundant uploads and improving efficiency. Also refactors code for clarity, updates type hints, and makes minor formatting improvements throughout the file.
2025-11-24 20:08:28 +02:00
Ammar
3235caf1b9 Refactor Qwen and Yupp providers for improved async handling
Updated Qwen provider to handle timeout via kwargs and improved type annotations. Refactored Yupp provider for better code organization, formatting, and async account rotation logic. Enhanced readability and maintainability by reordering imports, adding whitespace, and clarifying function implementations.
2025-11-22 15:08:17 +02:00
Ammar
1681466943 Refactor Qwen image upload and caching logic and token
Reworked the image upload flow in Qwen provider to use direct file uploads with OSS headers, added caching for uploaded images, and improved file type detection. Updated prepare_files to handle uploads via session and cache results, and added utility for generating OSS headers. Minor imports and typing adjustments included and token support.
2025-11-22 00:23:09 +02:00
Ammar
5dbc0f744c Update OpenaiChat.py 2025-11-21 18:00:26 +02:00
Ammar
c5e8681503 Add status parameter to get_generated_image method
Introduces a 'status' parameter to the get_generated_image method to allow passing image generation status. Updates method calls and response objects to include status in their metadata for improved tracking of image generation progress.
2025-11-21 16:20:57 +02:00
keacwu
05c108d3f6 Improve input handling in Grok.py
Refactor input selection and submission logic for better error handling and clarity.
2025-11-21 15:19:17 +08:00
Ammar
e81688185a Update Yupp.py 2025-11-20 01:48:04 +02:00
Ammar
aead0e4b76 Refactor to use StreamSession in Qwen and Yupp providers
Replaced aiohttp.ClientSession with StreamSession in Qwen.py and Yupp.py for improved session handling. Updated exception and timeout references in Yupp.py to use aiohttp types. Improved default argument handling in StreamSession initialization.
2025-11-20 01:44:28 +02:00
Ammar
0634807d44 Update LMArena.py
Not Found Model error
2025-11-16 18:03:25 +02:00
Ammar
c3f8d7e7f6 Handle multi-line <think> and <yapp> blocks in Yupp
Added logic to capture and process multi-line <think> and <yapp class="image-gen"> blocks referenced by special IDs. Introduced block storage and extraction functions, enabling reasoning and image-gen content to be handled via references in the response stream.
2025-11-16 04:02:04 +02:00
Ammar
8415963c99 Merge branch 'main' of https://github.com/3mora2/gpt4free 2025-11-16 02:37:45 +02:00
Ammar
4047ac5636 Update __init__.py 2025-11-16 02:28:58 +02:00
Ammar
7eb1d1a440 Improve Yupp provider account handling and request timeout
Refactored account loading to preserve account history and error counts when updating tokens. Enhanced request logic to support custom timeouts using aiohttp's ClientTimeout, allowing for more flexible timeout configuration.
2025-11-16 02:05:17 +02:00
Ammar
18fda760cb Add image caching to Yupp provider (#3246)
* Add image caching to Yupp provider

Introduces an image cache to avoid redundant uploads in the Yupp provider. Refactors media attachment handling into a new prepare_files method, improving efficiency and code organization. Updates .gitignore to exclude .idea directory.

* Refactor Yupp stream handling and chunk processing

Improves stream segmentation in the Yupp provider by introducing buffers for target, variant, quick, thinking, and extra streams. Refactors chunk processing to better handle image-gen, quick responses, and variant outputs, and adds more robust stream ID extraction and routing logic. Yields a consolidated JsonResponse with all stream segments for downstream use.

* Handle ClientResponseError in Yupp provider

Adds specific handling for aiohttp ClientResponseError in the Yupp provider. Marks account as invalid on 500 Internal Server Error, otherwise increments error count and raises ProviderException for other errors.

* Update Yupp.py

fix 429  'Too Many Requests'

* Update Yupp.py
2025-11-15 18:16:03 +01:00
Ammar
5aa372efba Update Yupp.py 2025-11-15 18:13:42 +02:00
Ammar
36d7910799 Merge branch 'main' of https://github.com/3mora2/gpt4free 2025-11-15 17:14:27 +02:00
Ammar
2ab3f8e318 Update Yupp.py
fix 429  'Too Many Requests'
2025-11-15 17:14:21 +02:00
Ammar
64218ca823 Merge branch 'xtekky:main' into main 2025-11-15 12:35:10 +02:00
hlohaus
9c7fc9fe4a Remove version declaration from Docker Compose files and update Dockerfile to streamline package installation v6.6.6 2025-11-14 19:52:57 +01:00
H Lohaus
f8978c1437 Update Dockerfile v6.6.5 2025-11-14 18:24:28 +01:00
hlohaus
fb26557dbb Fix model retrieval process in AnyModelProviderMixin
- Added error handling around model retrieval to prevent crashes when a provider fails.
- Ensured that exceptions during model fetching are logged for debugging purposes.
- Cleaned up the indentation and structure of the model retrieval logic for better readability.
v6.6.4
2025-11-14 17:24:28 +01:00
Ammar
2d552489c7 Handle ClientResponseError in Yupp provider
Adds specific handling for aiohttp ClientResponseError in the Yupp provider. Marks account as invalid on 500 Internal Server Error, otherwise increments error count and raises ProviderException for other errors.
2025-11-14 18:14:11 +02:00
hlohaus
36e66950ca Update default model to "gpt-5-1" and enhance text model list 2025-11-14 16:51:12 +01:00
Ammar
1c8b7a8717 Refactor Yupp stream handling and chunk processing
Improves stream segmentation in the Yupp provider by introducing buffers for target, variant, quick, thinking, and extra streams. Refactors chunk processing to better handle image-gen, quick responses, and variant outputs, and adds more robust stream ID extraction and routing logic. Yields a consolidated JsonResponse with all stream segments for downstream use.
2025-11-14 16:38:47 +02:00
Ammar
1c6124337c Add image caching to Yupp provider
Introduces an image cache to avoid redundant uploads in the Yupp provider. Refactors media attachment handling into a new prepare_files method, improving efficiency and code organization. Updates .gitignore to exclude .idea directory.
2025-11-14 01:50:32 +02:00
hlohaus
2955729584 Fix docker build, fix temporary chat v6.6.3 2025-11-10 19:56:51 +01:00
H Lohaus
bed8b7c083 Update Dockerfile v6.6.2 2025-11-10 16:14:50 +01:00
hlohaus
7234402211 Remove redundant pip upgrade command from Dockerfiles v6.6.1 2025-11-10 14:07:27 +01:00
hlohaus
1dac52a191 Refactor PollinationsAI model selection logic; update default system in AIModel; clean up unused provider imports v6.6.0 2025-11-10 13:58:07 +01:00
hlohaus
213e04bae7 Fix LMAreana provider 2025-11-10 09:30:53 +01:00
H Lohaus
5bacb669b2 Merge pull request #3237 from 3mora2/main
Improve auth cookie detection in Copilot provider
2025-11-09 22:01:49 +01:00
Ammar
db2e066657 Improve auth cookie detection in Copilot provider
Adds a check for 'auth0' in cookies when authentication is required, ensuring the loop breaks appropriately once the relevant cookie is present.
2025-11-07 18:04:40 +02:00
hlohaus
4d98885ec0 Refactor LMArena provider to generate unique evaluation session IDs; remove redundant assignment v6.5.7 2025-11-02 09:02:31 +01:00
hlohaus
af56ac0c03 Enhance MCP server tests to reflect updated tool count; improve model fetching with timeout handling in providers 2025-11-02 08:01:20 +01:00
hlohaus
006b8c8d50 Fix origin handling in HTTP request processing for MCP server v6.5.6 2025-11-02 07:45:49 +01:00
hlohaus
a492352901 Add CORS support to MCP server and tools; enhance image URL handling in tools 2025-11-02 07:31:28 +01:00
hlohaus
5d53e58d2c Add MarkItDownTool and TextToAudioTool; enhance scrape_text and fetch_and_scrape functions with metadata support 2025-11-02 04:32:32 +01:00
H Lohaus
8df4bc7118 Merge pull request #3228 from xtekky/copilot/create-mcp-server-for-gpt4free
Add MCP server with stdio and HTTP transports for web search, scraping, and image generation
v6.5.5
2025-11-01 20:35:28 +01:00
hlohaus
5276e2d6d0 Remove MCP usage guide and README files; update logging in API to use print for most wanted IPs; enhance WebSearchTool to support region parameter for search queries. 2025-11-01 20:34:47 +01:00
hlohaus
01d194ff4b Enhance MCP server and tools: add CORS support, initialize tool_calls, and update WebSearchTool to use CachedSearch 2025-11-01 11:55:42 +01:00
copilot-swe-agent[bot]
a15618a80e Add HTTP transport mode for MCP server with --http flag
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-11-01 05:25:49 +00:00
copilot-swe-agent[bot]
0a72ce961c Address code review feedback: improve type hints, validation, and documentation
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-11-01 05:17:04 +00:00
copilot-swe-agent[bot]
1e895fbb6a Add comprehensive MCP documentation and examples
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-11-01 05:13:47 +00:00
copilot-swe-agent[bot]
0c2a2b00c3 Add MCP server tests, documentation, and README updates
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-11-01 05:10:49 +00:00
copilot-swe-agent[bot]
e1214e4372 Add MCP server implementation with web search, scraping, and image generation tools
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-11-01 05:06:46 +00:00
copilot-swe-agent[bot]
58d95cb491 Initial plan 2025-11-01 04:54:13 +00:00