-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update providers documentation and enhance support for Blackbox HAR auth #2886
Conversation
… HAR auth - Added "No auth / HAR file" authentication type in providers-and-models.md - Added "Video generation" column to provider tables for future capability - Updated model counts and provider capabilities throughout documentation - Fixed ARTA provider with improved error handling and response validation - Enhanced AllenAI provider with vision model support and proper image handling - Significantly improved Blackbox provider: - Added HAR file authentication support - Added subscription status checking - Added premium/demo model differentiation - Improved session handling and error recovery - Enhanced DDG provider with better error handling for challenges - Improved PollinationsAI and PollinationsImage providers' model handling - Added VideoModel class in g4f/models.py - Added audio/video generation indicators in GUI components - Added new Ai2 models: olmo-1-7b, olmo-2-32b, olmo-4-synthetic - Added new commit message generation tool in etc/tool/commit.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Review
Title: Update providers documentation and enhance support for Blackbox HAR auth
Summary
Thank you for your contribution! This pull request includes significant updates to the providers documentation and enhances the support for Blackbox HAR authentication. The changes improve clarity and add useful features.
Changes Made
- Added a new authentication type for "No auth / HAR file" in the
providers-and-models.md
documentation. - Expanded the provider tables by including a "Video generation" column.
- Updated model counts and capabilities across the documentation for accuracy.
- Improved error handling and response validation for the ARTA provider.
- Enhanced the AllenAI provider to support new vision models and improve image handling.
- Major improvements to the Blackbox provider including:
- Support for HAR file authentication.
- Subscription status checks.
- Differentiation between premium and demo models.
- Improved session management and error recovery.
- Made enhancements to the DDG provider regarding error handling.
- Improved model handling for PollinationsAI and PollinationsImage providers.
- Added a new
VideoModel
class ing4f/models.py
. - Included audio/video generation indicators in the GUI components.
- Introduced new Ai2 models:
olmo-1-7b
,olmo-2-32b
, andolmo-4-synthetic
. - Created a new commit message generation tool in
etc/tool/commit.py
.
Documentation
The documentation updates ensure that users can easily understand the new functionality and features available, especially regarding the authentication methods and model capabilities.
Code Quality
The code improvements, especially around error handling, are essential for a robust user experience. It's also great to see the addition of clear and informative comments.
Suggestions
- Consider adding some examples or usage scenarios within the documentation to further assist users.
Overall, this pull request brings substantial value to the project, improving both documentation and functionality. Great work!
Thank you again for your contributions to the project!
Best Regards,
g4f Copilot
@@ -26,6 +26,7 @@ This document provides an overview of various AI providers and models, including | |||
- **Optional API key** - Works without authentication, but you can provide an API key for better rate limits or additional features. The service is usable without an API key. | |||
- **API key / Cookies** - Supports both authentication methods. You can use either an API key or browser cookies for authentication. | |||
- **No auth required** - No authentication needed. The service is publicly available without any credentials. | |||
- **No auth / HAR file** - Supports both authentication methods. The service works without authentication, but you can also use HAR file authentication for potentially enhanced features or capabilities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description "the service works without authentication, but you can also use HAR file authentication for potentially enhanced features or capabilities." is somewhat vague. It would be better to specify what enhanced features or capabilities HAR file authentication entails.
|[you.com](https://you.com)|[Manual cookies](https://you.com)|`g4f.Provider.You`|✔|✔|❌|✔|| | ||
|[websim.ai](https://websim.ai)|No auth required|`g4f.Provider.Websim`|`gemini-1.5-pro, gemini-1.5-flash`|`flux`|❌|❌|| | ||
|[chat9.yqcloud.top](https://chat9.yqcloud.top)|No auth required|`g4f.Provider.Yqcloud`|`gpt-4`|✔|❌|❌|| | ||
| Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Video generation | Vision (Image Upload) | Status | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have added a new "Video generation" column, but it seems some entries in this column are marked with ❌
even when corresponding providers support video generation. You may need to check and ensure that the data reflects the current capabilities accurately.
|[hailuo.ai/chat](https://www.hailuo.ai/chat)|[Get API key](https://intl.minimaxi.com/user-center/basic-information/interface-key)|`g4f.Provider.MiniMax`|`MiniMax` _**(1+)**_|❌|❌|❌|| | ||
| Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Video generation | Vision (Image Upload) | Status | | ||
|----------|-------------|--------------|---------------|--------|--------|------|------|------| | ||
|[hailuo.ai/chat](https://www.hailuo.ai/chat)|[Get API key](https://intl.minimaxi.com/user-center/basic-information/interface-key)|`g4f.Provider.MiniMax`|`MiniMax` _**(1+)**_|❌|❌|❌|❌|| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The entry for the g4f.Provider.MiniMax
provider lists "Video generation | ❌" despite a newly added "Video generation" support. Ensure the entry reflects the latest capabilities after recent updates.
|[platform.deepseek.com](https://platform.deepseek.com)|[Get API key](https://platform.deepseek.com/api_keys)|`g4f.Provider.DeepSeek`|✔ _**(1+)**_|❌|❌|❌|❌|| | ||
|[gemini.google.com](https://gemini.google.com)|[Manual cookies](https://gemini.google.com)|`g4f.Provider.Gemini`|`gemini-2.0`|`gemini-2.0`|❌|❌|`gemini-2.0`|| | ||
|[ai.google.dev](https://ai.google.dev)|[Get API key](https://aistudio.google.com/u/0/apikey)|`g4f.Provider.GeminiPro`|`gemini-1.5-flash, gemini-1.5-pro, gemini-2.0-flash`|❌|❌|❌|`gemini-1.5-pro`|| | ||
|[developers.sber.ru/gigachat](https://developers.sber.ru/gigachat)|[Manual cookies](https://developers.sber.ru/gigachat)|`g4f.Provider.GigaChat`|✔ _**(3+)**_|❌|❌|❌|❌|| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For g4f.Provider.GigaChat
, the entry lists multiple capabilities that may need updating as per new data, considering you have refined various provider capabilities in this pull request. Ensure consistency throughout.
|[replicate.com](https://replicate.com)|[Get API key](https://replicate.com/account/api-tokens)|`g4f.Provider.Replicate`|✔ _**(1+)**_|❌|❌|❌|❌|| | ||
|[beta.theb.ai](https://beta.theb.ai)|[Get API key](https://beta.theb.ai)|`g4f.Provider.ThebApi`|✔ _**(21+)**_|❌|❌|❌|❌|| | ||
|[whiterabbitneo.com](https://www.whiterabbitneo.com)|[Manual cookies](https://www.whiterabbitneo.com)|`g4f.Provider.WhiteRabbitNeo`|✔|❌|❌|❌|❌|| | ||
|[console.x.ai](https://console.x.ai)|[Get API key](https://console.x.ai)|`g4f.Provider.xAI`|✔|❌|❌|❌|❌|| | ||
|
||
--- | ||
## Models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider organizing the documentation to ensure easy navigation, particularly given the new elements introduced. It could help users access required information without excessive scrolling.
@@ -52,6 +54,8 @@ def get_provider_models(provider: str, api_key: str = None, api_base: str = None | |||
"model": model, | |||
"default": model == provider.default_model, | |||
"vision": getattr(provider, "default_vision_model", None) == model or model in getattr(provider, "vision_models", []), | |||
"audio": getattr(provider, "default_audio_model", None) == model or model in getattr(provider, "audio_models", []), | |||
"video": getattr(provider, "default_video_model", None) == model or model in getattr(provider, "video_models", []), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, the check for the video model here could be simplified or adjusted to ensure consistency with the checks for other model types.
- Added command-line argument parsing with options for model selection, editing, and no-commit mode - Implemented fallback mechanism with multiple AI models if the primary model fails - Added spinner display to indicate progress during API calls - Created functions to filter sensitive data from diffs before sending to API - Added diff truncation capabilities for handling large changesets - Implemented commit message editing in user's configured editor - Added model listing functionality to show available AI options - Enhanced error handling with retries and better error reporting - Added keyboard interrupt handling for graceful termination - Improved type annotations throughout the codebase - Added constants for configuration parameters like retry delay and max diff size
Review for Pull Request: Update providers documentation and enhance support for Blackbox HAR authSummaryThank you for your contribution to the project! This pull request introduces several enhancements and updates to the providers documentation, as well as significant improvements to the Blackbox provider. Changes
Documentation UpdatesThe documentation has been updated to reflect these changes, ensuring that users have the most current information regarding the capabilities and requirements of each provider. Recommendations
Overall, this is a well-structured and comprehensive update. Great job on enhancing the functionality and documentation of the project! Thank you once again for your valuable contribution! |
- Added *.bak and *.backup file patterns to .gitignore file - Placed new patterns at the end of the file after a blank line
Review for Pull Request: Update providers documentation and enhance support for Blackbox HAR authThank you for contributing to the project with this detailed and comprehensive pull request! The changes you made are beneficial and will enhance the documentation and functionality significantly. Changes Overview
Specific Changes Noted
Suggestions for ImprovementWhile the pull request is mostly solid, I suggest:
ConclusionYour efforts to enhance both the documentation and the functionality of various providers are commendable. The Pull Request is looking great, and I believe it will positively impact our users. Thank you once again for your contributions! I look forward to seeing this merged and the implementation of these features in our project. |
Review for Pull Request: Update providers documentation and enhance support for Blackbox HAR authThank you for your contributions to the project! This update makes substantial improvements and clarifications that will certainly enhance our documentation and provider capabilities. Summary of Changes
FeedbackPositive Aspects
Suggestions for Improvement
ConclusionOverall, this pull request is well-structured with clear improvements to both documentation and provider functionality. I'm looking forward to seeing how these changes enhance user interaction with the providers! Thanks again for your hard work! |
"deepseek-r1": "deepseek-reasoning-large", | ||
"deepseek-r1": "deepseek-reasoning", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can set one alias for a value
Thank you! |
docs: update providers documentation and enhance support for Blackbox HAR auth
feat: enhance commit tool with advanced options and error handling
chore: add backup files to .gitignore