Code Monkey home page Code Monkey logo

Comments (7)

hlohaus avatar hlohaus commented on June 3, 2024

Do you have stacktrace for this error?

from gpt4free.

ufoptg avatar ufoptg commented on June 3, 2024

Do you have stacktrace for this error?

ill show you

from gpt4free.

ufoptg avatar ufoptg commented on June 3, 2024
05/19/2024, 17:36:21 | ⛧Nim⛧pyLogs [INFO] : 'BingCreateImages' object has no attribute '__name__'
Traceback (most recent call last):
  File "addons/chatgpt.py", line 135, in handle_bigen
    response = await imgclient.images.generate(prompt=query, model="dall-e-3")
  File "/home/loki/ts/.ult/lib/python3.9/site-packages/g4f/client/async_client.py", line 224, in generate
    response = create_image(
  File "/home/loki/ts/.ult/lib/python3.9/site-packages/g4f/client/async_client.py", line 187, in create_image
    if provider.__name__ == "You":
AttributeError: 'BingCreateImages' object has no attribute '__name__'

File: chatgpt.py, Line 135

from gpt4free.

ufoptg avatar ufoptg commented on June 3, 2024

This is what i get when trying to use Normal Client

👩‍💻 Ⲉⳳⲁⳑ (in 0.672ms)
from g4f.client import Client

client = Client()
response = client.images.generate(
    model="dall-e-3",
    prompt="a white siamese cat",
)
image_url = response.data[0].url

p(image_url)
 

👨‍💻 Ⲟυⲧⲣυⲧ: 
Traceback (most recent call last):
  File "/home/loki/ts/Nimbus/plugins/devtools.py", line 267, in _
    value = await aexec(cmd, event)
  File "/home/loki/ts/Nimbus/plugins/devtools.py", line 351, in aexec
    return await locals()["__aexec"](event, event.client)
  File "<string>", line 10, in __aexec
  File "/home/loki/ts/.ult/lib/python3.9/site-packages/g4f/client/client.py", line 150, in generate
    response = list(provider.create(prompt))
AttributeError: 'BingCreateImages' object has no attribute 'create'

and this what happens with AsyncClient

👩‍💻 Ⲉⳳⲁⳑ (in 0.396ms)
from g4f.client import AsyncClient

client = AsyncClient()
response = await client.images.generate(
    model="dall-e-3",
    prompt="a white siamese cat",
)
image_url = response.data[0].url

p(image_url)
 

👨‍💻 Ⲟυⲧⲣυⲧ: 
Traceback (most recent call last):
  File "/home/loki/ts/Nimbus/plugins/devtools.py", line 267, in _
    value = await aexec(cmd, event)
  File "/home/loki/ts/Nimbus/plugins/devtools.py", line 351, in aexec
    return await locals()["__aexec"](event, event.client)
  File "<string>", line 10, in __aexec
  File "/home/loki/ts/.ult/lib/python3.9/site-packages/g4f/client/async_client.py", line 224, in generate
    response = create_image(
  File "/home/loki/ts/.ult/lib/python3.9/site-packages/g4f/client/async_client.py", line 187, in create_image
    if provider.__name__ == "You":
AttributeError: 'BingCreateImages' object has no attribute '__name__'

from gpt4free.

ufoptg avatar ufoptg commented on June 3, 2024

works fine when i downgrade back to v0.3.1.0

from gpt4free.

hlohaus avatar hlohaus commented on June 3, 2024

Hello, I fixed this problem in the latest version of the code.

AttributeError: 'BingCreateImages' object has no attribute 'name'

from gpt4free.

ufoptg avatar ufoptg commented on June 3, 2024

beautiful! :) Great job

from gpt4free.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.