-
-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
AttributeError: 'BingCreateImages' #2181
Comments
i think they don't want to respond to anyone (: . |
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again. |
Thank you for reporting this issue, @Ggre55. I've submitted a pull request that addresses this problem and improves the functionality of the image generation feature. While the PR is still pending review, I wanted to share a preview of the proposed changes. The upcoming update should resolve the error you've experienced. Here's an example of how the improved image generation code would work:
This implementation supports multiple image models and includes error handling. When run, it produces the following results:
As shown, the code successfully generates images using various models, demonstrating improved functionality and reliability. These enhancements should be available in a future release, pending review and approval by the project maintainers. @noneherel, thank you for your patience. The project team is likely reviewing contributions to enhance the project. Let's look forward to the upcoming updates that will improve the functionality of this great project! |
@kqlio67 i copy you code after update and we have problem with base64 decode
|
Thank you for reporting this issue, @TheFirstNoob. I've checked and fixed the provider, and now the error is gone. Here's an example of the execution and the result: from g4f.client import Client
img_models = ['sdxl', 'sd-3', 'playground-v2.5', 'flux', 'flux-realism', 'dalle', 'dalle-2', 'dalle-mini', 'emi']
client = Client()
for model in img_models:
try:
print(f'Generating image with {model}')
response = client.images.generate(
model=model,
prompt="hi, make cat with glasses and smily face in space dancing with cute man",
)
image_url = response.data[0].url
print(f"Generated image URL: {image_url}")
except Exception as e:
print(f"Error with {model}: {str(e)}")
print("------------------------") Execution result:
As you can see, all models are now working without errors. I've submitted a pull request with these fixes: #2220 This issue should be resolved in the next update once the pull request is merged. Thank you for your patience and for reporting this problem! |
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again. |
Closing due to inactivity. |
Bug description
pip install -U g4f[all]
'from g4f.gui import run_gui run_gui()
'Environment
Additional context
i did some diging and found the cause of the issue in this file,
"C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\g4f\client\client.py"
in line 157 'response = list(provider.create(prompt))', the create methode is not defined for the BingCreateImages that is returned from this file wich also i think is missing something
'C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\g4f\client\image_models.py'
Anyways love this project so much and i am working on pr that will add few models and fix the phind provider is that ok
The text was updated successfully, but these errors were encountered: