spring-projects / spring-projects/spring-ai
Feature Request : Consider making the ImageOptions properties such as N, Quality, dimensions etc to be an enum
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Consider making the ImageOptions properties such as N, Quality, dimensions etc to be an enum. For example, OpenAiImageOptions quality could be of two types, standard & hd. So if the well known property values are made as enum, it would help the devs and avoid them making wrong calls. For example, I was not aware of the standard type, so having seen hd, I supplied sd, thinking standard definition i.e. sd, would be supported, however this wasn't the case and I lost a few tokens in this call. Likewise, I lost quite a few iterations for the dimensions as well. With this kind of use case, please do consider making these kind of properties to be enum while retaining the current string type support (this will help with future extensibility, where a new feature introduced by any LLM could be supplied as String till the time the enum isn't updated). Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating OpenAiImageOptions and its N, quality, and dimensions properties. Review how these values are currently represented and tested, then define the enum and string-compatibility requirements; done means well-known values are discoverable without preventing future provider values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ai, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100