Waenara / bing-create

4 stars 3 forks source link

Raise exception when no images are generated on a successful response #1

Closed jdragonx closed 3 months ago

jdragonx commented 3 months ago

There are some instances when the response from bing looks ok, but no images are generated. I don't know if this is caused by the prompt (maybe the prompt is deemed unsafe). At least raising this exception makes it easier to handle.

BTW I'm using this package to generate images using a script, with the prompts coming from a LLM, so with this exception my script will automatically generate a new prompt and everything will work once again. At least that's my use case.

Thanks for you great work on this package, it's wonderful and really easy to use.