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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Dalle2SizeStage<R,E>singleChoice()Sets the number of generated images to one only.Dalle2SizeStage<R,E>withChoices(Integer choices)
-
-
-
Method Detail
-
withChoices
public Dalle2SizeStage<R,E> withChoices(Integer choices)
- 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
public Dalle2SizeStage<R,E> singleChoice()
Sets the number of generated images to one only.- Returns:
Dalle2SizeStageto configure the dimensions of the images.
-
-