-
-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Updating provider documentation and small fixes in providers #2469
Conversation
- Add hidden_models set to exclude specific models - Add evil alias for uncensored model handling - Extend filtering for model-specific response tokens - Add response buffering for streamed content - Update model fetching with error handling
- Add caching system for validated values with file-based storage - Rename 'flux' model to 'ImageGeneration' and update references - Add temperature, top_p and max_tokens parameters to generator - Simplify HTTP headers and remove redundant options - Add model alias mapping for ImageGeneration - Add file system utilities for cache management
- Add file-based caching system for access tokens and sessions - Add robust error handling with specific error messages - Add automatic dialog continuation on resource limits - Add HTML parsing with BeautifulSoup for token extraction - Add debug logging for error tracking - Add timeout configuration for API requests
…ases - Change default model from llama-3-405b to llama-3-70b - Remove llama-3-405b from supported models list - Remove llama-3.1-405b from model aliases
- Add image model 'flux' with dedicated API endpoint - Refactor generator to support both text and image outputs - Extract headers into reusable static method - Add type hints for AsyncGenerator return type - Split generation logic into _generate_text and _generate_image methods - Add ImageResponse handling for image generation results BREAKING CHANGE: create_async_generator now returns AsyncGenerator instead of AsyncResult
…tion - Update models list to include gpt-3.5-turbo - Remove chatgpt-4o-latest from supported models - Remove model_aliases mapping for gpt-4o
- Add Accept-Language header for internationalization - Maintain existing header configuration - Improve request compatibility with language preferences
…nheritance - Add ProviderModelMixin to class inheritance - Import ProviderModelMixin from base_provider - Move BaseConversation import to base_provider imports
- Add version suffix to o1 model IDs - Update model aliases for o1-preview and o1-mini - Standardize version format across model definitions
…eneration - Split generation logic into dedicated image/text methods - Add additional text models including sur and claude - Add width/height parameters for image generation - Add model existence validation - Add hasattr checks for model lists initialization
- Add g4f/Provider/.cache to gitignore patterns
- Update default model to gemma-2b-it - Add default_image_model configuration - Remove llava-13b from supported models - Simplify request headers
- Add new providers DarkAI and PollinationsAI - Add new models for Mistral, Flux and image generation - Update provider lists for existing models - Add P1 and Evil models with experimental providers BREAKING CHANGE: Remove llava-13b model support
- Change return type of from to for consistency with import. - Maintain overall functionality and structure of the class. - Ensure compatibility with type hinting standards in Python.
…e return - Change return type of 'split_message' from 'list[str]' to 'List[str]' for consistency with import. - Maintain overall functionality and structure of the 'Airforce' class. - Ensure compatibility with type hinting standards in Python.
…ulSoup dependency - Introduce a check for the BeautifulSoup library and handle its absence gracefully. - Raise a if BeautifulSoup is not installed, prompting the user to install it. - Remove direct import of BeautifulSoup to avoid import errors when the library is missing.
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.
Review for Pull Request: Updating provider documentation and small fixes in providers
Summary
Thank you for your contribution to the project! This pull request includes updates to the provider documentation and some small fixes in the provider implementations.
Changes
-
Documentation Updates:
- The documentation for various AI providers and models has been updated to provide clearer information and organization.
- New sections have been added, such as "Providers Free" and "Providers Needs Auth," which enhance the usability of the documentation.
-
Code Fixes:
- Minor adjustments in the provider classes, including updates to model aliases and default models.
- Improved the structure of the provider classes to ensure better readability and maintainability.
Suggestions
- Consider adding examples or use cases in the documentation to help users understand how to utilize the different providers effectively.
- Ensure that all links in the documentation are functional and lead to the correct resources.
Conclusion
Overall, this is a great improvement to the documentation and the provider implementations. Thank you for your hard work and dedication to enhancing the project!
Keep up the great work! 😊
# G4F - Providers and Models | ||
|
||
This document provides an overview of various AI providers and models, including text generation, image generation, and vision capabilities. It aims to help users navigate the diverse landscape of AI services and choose the most suitable option for their needs. | ||
|
||
## Table of Contents | ||
- [Providers](#providers) | ||
- [Free](#providers-free) | ||
- [Needs Auth](#providers-needs-auth) | ||
- [Models](#models) | ||
- [Text Models](#text-models) | ||
- [Image Models](#image-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.
- The line
- - [Vision Models](#vision-models)
has an extra hyphen that should be removed to maintain consistency with the other entries.
docs/providers-and-models.md
Outdated
### Providers Free | ||
| Website | Provider | Text Models | Image Models | Vision Models | Stream | Status | Auth | | ||
|----------|-------------|--------------|---------------|--------|--------|------|------| | ||
|[api.airforce](https://api.airforce)|`g4f.Provider.Airforce`|`phi-2, gpt-4o-mini, gpt-4o, gpt-4-turbo, o1-mini, openchat-3.5, deepseek-coder, hermes-2-dpo, hermes-2-pro, openhermes-2.5, lfm-40b, german-7b, llama-2-7b, llama-3.1-70b, neural-7b, zephyr-7b, evil,`|`sdxl, flux-pro, flux, flux-realism, flux-anime, flux-3d, flux-disney, flux-pixel, flux-4o, any-dark`|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌+✔| |
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
g4f.Provider.Blackbox2
appears to be duplicated from the previous entry forg4f.Provider.Blackbox
. Ensure that each provider is listed only once to avoid confusion.
|[console.upstage.ai/playground/chat](https://console.upstage.ai/playground/chat)|`g4f.Provider.Upstage`|`solar-pro, solar-mini`|❌|❌|✔|![Active](https://img.shields.io/badge/Active-brightgreen)|❌| | ||
|[whiterabbitneo.com](https://www.whiterabbitneo.com)|`g4f.Provider.WhiteRabbitNeo`|✔|❌|❌|?|![Unknown](https://img.shields.io/badge/Unknown-grey)|✔| | ||
|[you.com](https://you.com)|`g4f.Provider.You`|✔|✔|✔|✔|![Unknown](https://img.shields.io/badge/Unknown-grey)|❌+✔| | ||
|[bing.com/images/create](https://www.bing.com/images/create)|`g4f.Provider.BingCreateImages`|❌|`dall-e-3`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|✔| |
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
g4f.Provider.BingCreateImages
has a missing model name in theModel
column. Please provide the appropriate model name to maintain clarity.
|dalle-2|OpenAI|1+ Providers|[openai.com](https://openai.com/index/dall-e-2/)| | ||
|emi||1+ Providers|[]()| | ||
|any-dark||1+ Providers|[]()| | ||
|dall-e-3|OpenAI|5+ Providers|[openai.com](https://openai.com/index/dall-e/)| |
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
dall-e-3
should be checked for consistency in the number of providers listed. Ensure that it matches the format used in other entries.
"llama-2-7b": "llama-2-7b-chat-int8", | ||
"llama-3.1-70b": "llama-3.1-70b-turbo", | ||
"neural-7b": "neural-chat-7b-v3-1", | ||
"zephyr-7b": "zephyr-7b-beta", | ||
"evil": "any-uncensored", | ||
"sdxl": "stable-diffusion-xl-lightning", | ||
"sdxl": "stable-diffusion-xl-base", |
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 key "sdxl" is duplicated. Please ensure that each key is unique to avoid potential conflicts.
|
||
|
||
class RobocodersAPI(AsyncGeneratorProvider, ProviderModelMixin): | ||
label = "API Robocoders AI" | ||
url = "https://api.robocoders.ai/docs" | ||
api_endpoint = "https://api.robocoders.ai/chat" | ||
working = True | ||
working = False |
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 variable working
is set to False
, which may indicate that the API is currently not operational. If this is intentional, consider adding a comment explaining the reason for this change to provide clarity for future maintainers.
@@ -5,10 +5,13 @@ | |||
from .AIUncensored import AIUncensored | |||
from .Aura import Aura | |||
from .Chatgpt4o import Chatgpt4o |
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 class name Chatgpt4o
should be consistent with PEP 8 naming conventions. Consider renaming it to ChatGPT4o
for clarity and consistency.
@@ -5,10 +5,13 @@ | |||
from .AIUncensored import AIUncensored | |||
from .Aura import Aura | |||
from .Chatgpt4o import Chatgpt4o | |||
from .Chatgpt4Online import Chatgpt4Online |
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 class name Chatgpt4Online
should be consistent with PEP 8 naming conventions. Consider renaming it to ChatGPT4Online
for clarity and consistency.
from .ChatgptFree import ChatgptFree | ||
from .FlowGpt import FlowGpt | ||
from .FreeNetfly import FreeNetfly | ||
from .GPROChat import GPROChat | ||
from .Koala import Koala | ||
from .MagickPen import MagickPen |
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 class name MagickPen
should be consistent with PEP 8 naming conventions. Consider renaming it to MagicPen
for clarity and consistency.
@@ -294,7 +294,7 @@ <h3>Settings</h3> | |||
<option value="OpenaiChat">OpenAI ChatGPT</option> | |||
<option value="Copilot">Microsoft Copilot</option> | |||
<option value="Gemini">Google Gemini</option> | |||
<option value="DDG">DuckDuckGo</option> | |||
<option value="DDG">DuckDuckGo AI Chat</option> |
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 option value 'DuckDuckGo AI Chat' should be consistent with the naming conventions used for other options. Consider whether 'DuckDuckGo' or 'DuckDuckGo AI Chat' is more appropriate for clarity and consistency.
Thank you. I have updated the model list in models.py too. |
Review by g4f copilotThank you for your contribution to the project! Here are some thoughts and suggestions: General Comments:
Specific Changes:
Code Review:
Suggestions for Improvement:
Conclusion:Your pull request has significantly enhanced the documentation and functionality of the project. With a few minor additions and clarifications, this update will be even more useful for both users and contributors. Thank you for your hard work! |
Review by g4f copilot: Thank you for your contributions to the project! Here's my review: Documentation Changes
Code Changes
Suggestions:
Thank you again for your efforts in updating and refining our documentation and codebase! Your contributions significantly enhance the project's usability and maintainability. |
Thank you so much for your valuable input and feedback @hlohaus! Your contributions to this project are truly appreciated. I'm particularly impressed with the unit test you've added to check if all the models we use are present in the provider's model list. This is an excellent addition that will significantly enhance our ability to verify the consistency between our code and the provider's available models. It's a great step towards improving the overall reliability of our system. Your work on updating the model list in models.py is also very helpful in keeping our codebase up-to-date. These changes will undoubtedly make our project more robust and easier to maintain. I have a suggestion that I think could further improve the user experience in our GUI. Have you considered adding a "Continue generating" function, similar to what ChatGPT offers? This feature could be incredibly useful when the model hasn't fully completed generating code or text. Users could simply click a button to continue the generation process. I believe this would be a valuable addition, but I'm not entirely confident in implementing it correctly myself. If you have some free time in the future, it would be fantastic to see such a feature or enhancement in the GUI. Once again, thank you for your outstanding contributions to this project. Your work is making a real difference! |
@kqlio67 Hi. |
…ce.py g4f/Provider/PollinationsAI.py
g4f Copilot Review of "Updating provider documentation and small fixes in providers"Thank you for your contributions to the g4f project! This pull request makes significant improvements to the provider documentation and includes helpful fixes in several provider files. Here's a breakdown of my review: Positive Aspects:
Areas for Potential Improvement:
Overall: This pull request is a valuable contribution to the project. The improvements to the documentation and the fixes in the provider files are significant and greatly enhance the user experience. Addressing the points mentioned above will further improve this already excellent contribution. I recommend merging this pull request after the suggested changes have been implemented and thoroughly tested. |
Review for Pull Request: Updating provider documentation and small fixes in providersOverviewThank you for your contribution to the project! This pull request provides updates to the provider documentation and includes several small fixes in the provider implementations. Changes
Suggestions
Overall, this is a great update that improves both the documentation and the codebase. Thank you for your hard work and dedication to enhancing the project! |
Pull Request Review for "Updating provider documentation and small fixes in providers"SummaryThank you for your contribution to the project! This pull request includes updates to the provider documentation and some small fixes in the provider implementations. Changes
Review
Suggestions
ConclusionOverall, this pull request is a valuable addition to the project. Thank you for your hard work and dedication! Looking forward to seeing more contributions from you in the future. Best regards, |
g4f copilot's Review of "Updating provider documentation and small fixes in providers"Thank you for your contributions to the G4F project! This pull request makes significant improvements to the provider documentation and includes several helpful fixes. Here are my comments: Overall: The updated documentation is much clearer and easier to navigate. The separation of free and auth-required providers is a great addition. The use of shields.io badges for status is visually appealing and informative. The tables are well-organized and easy to read. Specific Comments:
Minor suggestions:
Overall, this is a high-quality pull request that improves both the code and the documentation. I recommend merging this PR after addressing the minor suggestions above. |
Review for Pull Request: Updating provider documentation and small fixes in providersSummaryThank you for your contribution to the project! This pull request includes updates to the provider documentation and some small fixes in the provider implementations. Changes
Highlights
Suggestions
ConclusionOverall, this pull request significantly improves the clarity and usability of the provider documentation. Great job on the updates! Looking forward to seeing more contributions from you in the future! Best regards, |
Thank you |
No description provided.