Class ChoicesStage<R extends bg.codexio.ai.openai.api.payload.images.request.ImageRequest,E extends RuntimeSelectionStage>
java.lang.Object
bg.codexio.ai.openai.api.sdk.images.ImageConfigurationStage<R>
bg.codexio.ai.openai.api.sdk.images.ChoicesStage<R,E>
- All Implemented Interfaces:
IntermediateStage
public class ChoicesStage<R extends bg.codexio.ai.openai.api.payload.images.request.ImageRequest,E extends RuntimeSelectionStage>
extends ImageConfigurationStage<R>
implements IntermediateStage
A stage to choose the number of the images generated.
Currently, this is supported only by dall-e-2 model
-
Field Summary
Fields inherited from class bg.codexio.ai.openai.api.sdk.images.ImageConfigurationStage
builder, executor -
Method Summary
Modifier and TypeMethodDescriptionSets the number of generated images to one only.withChoices(Integer choices)
-
Method Details
-
withChoices
- Parameters:
choices- the desired number of the images outputSets the number of generated images to the desired one.
Important note: The min count is 1 and the max count is 10. If a different count is passed, it will result in error is the API response.- Returns:
Dalle2SizeStageto configure the dimensions of the images.
-
singleChoice
Sets the number of generated images to one only.- Returns:
Dalle2SizeStageto configure the dimensions of the images.
-