How idiomatic is my code?

This is a project that I made to generate ASCII Art using AI, It uses Dall-e Mini to do so.

But I find It hard to make sure I am doing things correctly so here is my code

You don't need default_value for arguments that are Option<T>.

1 Like

Yes! But there is a special reason that I did that which I didn't mentioned in the code. The API required me to send valid strings instead of None when It comes to prompts so I used default_value on negative_prompt which would address this error.

Then you should be able to leave default_value and remove Option.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.