Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add “standard” Quality Option to Quality Class #376

Open
hubercode opened this issue Aug 17, 2024 · 0 comments
Open

Add “standard” Quality Option to Quality Class #376

hubercode opened this issue Aug 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hubercode
Copy link

Feature Description

I would like to request the addition of a “standard” quality option to the Quality class in the openai-kotlin library. Currently, the Quality class only supports the “hd” quality, but the OpenAI API itself supports both “hd” and “standard” qualities.

Problem it Solves

The current implementation of the Quality class only allows for the “hd” quality, which may lead to confusion for developers who are unaware that the API also supports a “standard” quality. While setting the quality parameter to null implies “standard” quality, this is not immediately obvious, and could lead to unintended usage or confusion. Adding explicit support for the “standard” quality in the Quality class would make the API more intuitive and reduce potential errors.

Proposed Solution

I propose adding an additional entry for “standard” quality in the Quality enum class. This would allow developers to explicitly set the quality to “standard” when making API requests. The updated Quality class might look something like this:

@Serializable
@JvmInline
public value class Quality(public val value: String) {
    public companion object {
        public val STANDARD: Quality = Quality("standard")
        public val HD: Quality = Quality("hd")
    }
}

Additional Context

This feature aligns the openai-kotlin library more closely with the capabilities of the OpenAI API as documented here. It also enhances the clarity of the API, making it more user-friendly for developers who are integrating OpenAI’s image generation features into their Kotlin applications.

@hubercode hubercode added the enhancement New feature or request label Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant