-
-
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
Update providers, documentation improvements and bug fixes #2562
Conversation
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: Update providers, documentation improvements and bug fixes
Thank you for contributing to the project! Your efforts in updating the providers, improving documentation, and fixing bugs are greatly appreciated.
Summary of Changes
-
New Providers Added:
AutonomousAI
CablyAI
ChatGLM
ImageLabs
-
Documentation Improvements:
- Added new sections and updated existing ones in
providers-and-models.md
to include new providers and models.
- Added new sections and updated existing ones in
-
Bug Fixes:
- Adjusted the
Airforce
provider to setworking
toFalse
. - Various improvements in the handling of API keys and response parsing across multiple providers.
- Adjusted the
Detailed Feedback
-
New Providers:
- The addition of new providers like
AutonomousAI
,CablyAI
, andChatGLM
enhances the functionality of the project. Ensure that the documentation for these providers is clear and comprehensive.
- The addition of new providers like
-
Documentation:
- The updates to
providers-and-models.md
are well-structured. The inclusion of new models under the respective providers is helpful for users to understand the capabilities of each provider.
- The updates to
-
Code Quality:
- The code changes are clean and follow the existing coding standards. The use of async functions and proper error handling is commendable.
-
Testing:
- Ensure that there are adequate tests for the new providers and any changes made to existing ones. This will help maintain the stability of the project.
-
Deprecation of API Key Check:
- The removal of the API key check in the
Airforce
provider is a significant change. Make sure to document this change clearly, as it may affect users relying on this functionality.
- The removal of the API key check in the
Suggestions
- Consider adding examples in the documentation for how to use the new providers effectively.
- It might be beneficial to include a changelog to track changes made in each version for better transparency.
Overall, this pull request is a great step forward for the project. Thank you once again for your hard work and dedication!
@@ -8,6 +8,7 @@ This document provides an overview of various AI providers and models, including | |||
## Table of Contents | |||
- [Providers](#providers) | |||
- [Free](#providers-free) | |||
- [HuggingSpace](#providers-huggingspace) |
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
HuggingSpace
should be consistent with the naming convention used for other providers. Consider using the same case style as other entries.
@@ -22,10 +23,14 @@ | |||
|----------|-------------|--------------|---------------|--------|--------|------|------| | |||
|[api.airforce](https://api.airforce)|`g4f.Provider.Airforce`|`phi-2, openchat-3.5, deepseek-coder, hermes-2-dpo, hermes-2-pro, openhermes-2.5, lfm-40b, german-7b, llama-2-7b, llama-3.1-8b, 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, midjourney, dall-e-3`|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌+✔| | |||
|[amigochat.io](https://amigochat.io/chat/)|`g4f.Provider.AmigoChat`|✔|✔|❌|✔|![Error](https://img.shields.io/badge/RateLimit-f48d37)|❌| | |||
|[blackbox.ai](https://www.blackbox.ai)|`g4f.Provider.Blackbox`|`blackboxai, gpt-4, gpt-4o, gemini-1.5-pro, claude-3.5-sonnet, blackboxai-pro, llama-3.1-8b, llama-3.1-70b, llama-3.3-70b, mixtral-7b, deepseek-chat, dbrx-instruct, qwq-32b, hermes-2-dpo`|`flux`|`blackboxai, gpt-4o, gemini-1.5-pro, gemini-1.5-flash, llama-3.1-8b, llama-3.1-70b, llama-3.1-405b`|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | |||
|[autonomous.ai](https://www.autonomous.ai/anon/)|`g4f.Provider.AutonomousAI`|`llama-3.3-70b, qwen-2.5-coder-32b, hermes-3, llama-3.2-90b, llama-3.3-70b`|✔|❌|✔|![Error](https://img.shields.io/badge/RateLimit-f48d37)|❌| |
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
blackbox.ai
appears twice with different details. Ensure that there is no duplication and that the information is accurate.
@@ -36,37 +41,47 @@ | |||
|[chat10.free2gpt.xyz](https://chat10.free2gpt.xyz)|`g4f.Provider.Free2GPT`|`mistral-7b`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | |||
|[freegptsnav.aifree.site](https://freegptsnav.aifree.site)|`g4f.Provider.FreeGpt`|`gemini-1.5-pro`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | |||
|[app.giz.ai/assistant](https://app.giz.ai/assistant)|`g4f.Provider.GizAI`|`gemini-1.5-flash`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | |||
|[editor.imagelabs.net](editor.imagelabs.net)|`g4f.Provider.ImageLabs`|❌|✔|❌|✔|![](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
editor.imagelabs.net
is missing a URL format. Ensure that the URL is complete and correctly formatted.
@@ -36,37 +41,47 @@ | |||
|[chat10.free2gpt.xyz](https://chat10.free2gpt.xyz)|`g4f.Provider.Free2GPT`|`mistral-7b`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | |||
|[freegptsnav.aifree.site](https://freegptsnav.aifree.site)|`g4f.Provider.FreeGpt`|`gemini-1.5-pro`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | |||
|[app.giz.ai/assistant](https://app.giz.ai/assistant)|`g4f.Provider.GizAI`|`gemini-1.5-flash`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | |||
|[editor.imagelabs.net](editor.imagelabs.net)|`g4f.Provider.ImageLabs`|❌|✔|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | |||
|[huggingface.co/spaces](https://huggingface.co/spaces)|`g4f.Provider.HuggingSpace`|`qwen-2.5-72b, qwen-2.5-72b`|`flux-dev, flux-schnell, sd-3.5`|❌|✔|![](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
huggingface.co/spaces
has a duplicate model listed. Ensure that each model is unique and not repeated.
|[liaobots.work](https://liaobots.work)|`g4f.Provider.Liaobots`|`grok-2, gpt-4o-mini, gpt-4o, gpt-4, o1-preview, o1-mini, claude-3-opus, claude-3.5-sonnet, claude-3-sonnet, gemini-1.5-flash, gemini-1.5-pro, gemini-2.0-flash, gemini-2.0-flash-thinking`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | ||
|[mhystical.cc](https://mhystical.cc)|`g4f.Provider.Mhystical`|`gpt-4`|❌|❌|✔|![Error](https://img.shields.io/badge/Active-brightgreen)|❌| | ||
|[labs.perplexity.ai](https://labs.perplexity.ai)|`g4f.Provider.PerplexityLabs`|`sonar-online, sonar-chat, llama-3.3-70b, llama-3.1-8b, llama-3.1-70b, lfm-40b`|❌|❌|✔|![Error](https://img.shields.io/badge/Active-brightgreen)|❌| | ||
|[pi.ai/talk](https://pi.ai/talk)|`g4f.Provider.Pi`|`pi`|❌|❌|✔|![Error](https://img.shields.io/badge/Active-brightgreen)|❌| | ||
|[pizzagpt.it](https://www.pizzagpt.it)|`g4f.Provider.Pizzagpt`|`gpt-4o-mini`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | ||
|[pollinations.ai](https://pollinations.ai)|`g4f.Provider.PollinationsAI`|`gpt-4o, mistral-large, mistral-nemo, llama-3.1-70b, gpt-4, qwen-2.5-coder-32b, claude-3.5-sonnet, command-r, evil, p1,turbo, unity, midijourney, rtist`|`flux, flux-realism, flux-cablyai, flux-anime, flux-3d, any-dark, flux-pro, midjourney, dall-e-3`|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|❌| | ||
|[pollinations.ai](https://pollinations.ai)|`g4f.Provider.PollinationsAI`|`gpt-4o, mistral-large, mistral-nemo, llama-3.3-70b, gpt-4, qwen-2-72b, qwen-2.5-coder-32b, claude-3.5-sonnet, command-r, deepseek-chat, llama-3.2-3b, evil, p1, turbo, unity, midijourney, rtist`|`flux, flux-realism, flux-cablyai, flux-anime, flux-3d, any-dark, flux-pro, midjourney, 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
pollinations.ai
has a duplicate model listed. Ensure that each model is unique and not repeated.
@@ -12,13 +12,14 @@ | |||
class VoodoohopFlux1Schnell(AsyncGeneratorProvider, ProviderModelMixin): | |||
url = "https://voodoohop-flux-1-schnell.hf.space" | |||
api_endpoint = "https://voodoohop-flux-1-schnell.hf.space/call/infer" | |||
|
|||
working = True | |||
|
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 working
attribute is added but not explained in the code's context. Verify if it is being utilized effectively elsewhere in the class or if additional handling is required.
working = True | ||
|
||
default_model = "flux-schnell" | ||
default_model = "voodoohop-flux-1-schnell" |
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 default_model
value has been changed to voodoohop-flux-1-schnell
. Ensure that this change is intentional and consistent with any external dependencies or references that expect the previous value, flux-schnell
.
models = [*image_models] | ||
model_aliases = {"flux-schnell-voodoohop": default_model} | ||
models = image_models | ||
model_aliases = {"flux-schnell": default_model} |
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 flux-schnell
in model_aliases
has been updated to replace flux-schnell-voodoohop
. Validate whether this change aligns with the expected behavior of the alias mapping and verify downstream impacts, if any.
@@ -72,4 +73,4 @@ | |||
json_data = json.loads(data) | |||
image_url = json_data[0]['url'] | |||
yield ImageResponse(images=[image_url], alt=prompt) |
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 return
statement has been removed. Ensure that its removal does not impact the function's behavior, especially if the return was crucial for terminating execution or compatibility with consumers of this output.
@@ -46,11 +46,10 @@ class HuggingChat(AbstractProvider, ProviderModelMixin): | |||
'NousResearch/Hermes-3-Llama-3.1-8B', | |||
'mistralai/Mistral-Nemo-Instruct-2407', | |||
'microsoft/Phi-3.5-mini-instruct', | |||
*image_models | |||
] | |||
] + image_models | |||
model_aliases = { | |||
### Chat ### |
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.
Ensure the alias 'qwen-2.5-72b'
for 'Qwen/Qwen2.5-72B-Instruct'
is either retained or necessary documentation updates reflect this change in the model alias mapping.
Pull Request ReviewThank you for your contribution to the project, None! Below is my review of your pull request titled "Update providers, documentation improvements and bug fixes". Summary of ChangesThis pull request introduces the following significant updates:
Suggestions & Feedback1. Documentation
2. Code Quality
3. Testing
Review OutcomeOverall, the contribution:
However, a few minor documentation updates and code refactorings can make this PR even better. Thank you again for making these significant updates to the project! Let me know if you have any questions or need clarification on any of the issues mentioned. Review ApprovalI recommend APPROVING the pull request after incorporating the above suggestions. With appreciation, |
Thank you |
No description provided.