BESSER-PEARL / BESSER

A Python-based low-modeling low-code platform for smart software
https://besser.readthedocs.io/en/latest/
MIT License
44 stars 11 forks source link

Handle errors in OpenAI call #75

Closed Aran30 closed 4 months ago

Aran30 commented 4 months ago

Due to limitations from OpenAI's API, images with a too large resolution will lead to an error. We should add an adequate error message for this kind of problem.

FitashUlHaq commented 4 months ago

I think we can handle this programmatically using PIL to increase usability of the tool :)

Aran30 commented 4 months ago

After trying out some things, turns out the resolution is not the problem, but the used image has some weird problem. Opening the image with the paint application and pressing save solves the issue, so it does not seem to be a resolution problem. I'll add the image for good measure, but adding a warning message should be enough. cursedImage

ivan-alfonso commented 4 months ago

Added error message in case of API problem.