-
-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
New RobocodersAPI provider with providers enhancement and client updates #2388
Conversation
…namic model fetching
…iguration and streamline code
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.
- Add error handling for API calls in
fetch_completions_models()
andfetch_imagine_models()
.
g4f/client/__init__.py
Outdated
@@ -254,6 +254,8 @@ | |||
provider_handler = self.models.get(model, provider or self.provider or BingCreateImages) | |||
elif isinstance(provider, str): | |||
provider_handler = convert_to_provider(provider) | |||
else: |
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 adding a type hint to provider_handler
for better clarity.
…d improve response handling
Pull Request Review: New RobocodersAPI Provider with EnhancementsChanges OverviewThank you for contributing to the project by enhancing the provider functionalities and adding the new RobocodersAPI provider! Your work will significantly improve the flexibility and efficiency of the codebase. Here are some specific points about the changes: Provider EnhancementsAirforce Provider
Blackbox Provider
New RobocodersAPI Provider
Client Updates
Code Quality
Suggestions
Thank you once again for your excellent contributions to the project! Keep up the great work! |
Thank you |
# g4f/Provider/
(g4f/Provider/Airforce.py):
Enhance Airforce provider with dynamic model fetching
fetch_completions_models()
andfetch_imagine_models()
class methods to retrieve available modelsmodel_aliases
dictionary with more comprehensive mappings for text and image modelsdefault_image_model
andadditional_models_imagine
for increased flexibilityAirforceChat
andAirforceImage
dependenciestext_models
,image_models
, andmodels
lists at runtime(g4f/Provider/Blackbox.py):
Enhance Blackbox AI provider configuration and streamline code
default_image_model
to use 'Image Generation' instead of 'generate_image'vision_models
to include more specific model variantsuserSelectedModel
list to replace previous text_models configurationgenerate_id()
to replaceget_random_string()
for generating message IDsmodels
attribute by usingdict.fromkeys()
to remove duplicatescreate_async_generator()
to include an alt text for image responsesresponse.text()
instead of streaming contentEnhance model prefix handling for Blackbox AI
additional_prefixes
dictionary to support more specific model prefixesmodel_prefixes
to incorporate both existing trending agent modes and new additional prefixes(g4f/Provider/RobocodersAPI.py):
Add RobocodersAPI new async chat provider
# g4f/client
(g4f/client/init.py):
Improve provider handling in async_generate method
async_generate
method# g4f/
(g4f/models.py):
Update provider configurations for multiple models