Package com.azure.ai.openai.models
Class ImageGenerationOptions
java.lang.Object
com.azure.ai.openai.models.ImageGenerationOptions
Represents the request data used to generate images.
-
Constructor Summary
ConstructorsConstructorDescriptionImageGenerationOptions(String prompt) Creates an instance of ImageGenerationOptions class. -
Method Summary
Modifier and TypeMethodDescriptiongetModel()Get the model property: The model name or Azure OpenAI model deployment name to use for image generation.getN()Get the n property: The number of images to generate.Get the prompt property: A description of the desired images.Get the quality property: The desired image generation quality level to use.Get the responseFormat property: The format in which image generation response items should be presented.getSize()Get the size property: The desired dimensions for generated images.getStyle()Get the style property: The desired image generation style to use.getUser()Get the user property: A unique identifier representing your end-user, which can help to monitor and detect abuse.Set the model property: The model name or Azure OpenAI model deployment name to use for image generation.Set the n property: The number of images to generate.setQuality(ImageGenerationQuality quality) Set the quality property: The desired image generation quality level to use.setResponseFormat(ImageGenerationResponseFormat responseFormat) Set the responseFormat property: The format in which image generation response items should be presented.Set the size property: The desired dimensions for generated images.setStyle(ImageGenerationStyle style) Set the style property: The desired image generation style to use.Set the user property: A unique identifier representing your end-user, which can help to monitor and detect abuse.
-
Constructor Details
-
ImageGenerationOptions
Creates an instance of ImageGenerationOptions class.- Parameters:
prompt- the prompt value to set.
-
-
Method Details
-
getPrompt
Get the prompt property: A description of the desired images.- Returns:
- the prompt value.
-
getN
Get the n property: The number of images to generate. Dall-e-2 models support values between 1 and 10. Dall-e-3 models only support a value of 1.- Returns:
- the n value.
-
setN
Set the n property: The number of images to generate. Dall-e-2 models support values between 1 and 10. Dall-e-3 models only support a value of 1.- Parameters:
n- the n value to set.- Returns:
- the ImageGenerationOptions object itself.
-
getSize
Get the size property: The desired dimensions for generated images. Dall-e-2 models support 256x256, 512x512, or 1024x1024. Dall-e-3 models support 1024x1024, 1792x1024, or 1024x1792.- Returns:
- the size value.
-
setSize
Set the size property: The desired dimensions for generated images. Dall-e-2 models support 256x256, 512x512, or 1024x1024. Dall-e-3 models support 1024x1024, 1792x1024, or 1024x1792.- Parameters:
size- the size value to set.- Returns:
- the ImageGenerationOptions object itself.
-
getUser
Get the user property: A unique identifier representing your end-user, which can help to monitor and detect abuse.- Returns:
- the user value.
-
setUser
Set the user property: A unique identifier representing your end-user, which can help to monitor and detect abuse.- Parameters:
user- the user value to set.- Returns:
- the ImageGenerationOptions object itself.
-
getResponseFormat
Get the responseFormat property: The format in which image generation response items should be presented.- Returns:
- the responseFormat value.
-
setResponseFormat
Set the responseFormat property: The format in which image generation response items should be presented.- Parameters:
responseFormat- the responseFormat value to set.- Returns:
- the ImageGenerationOptions object itself.
-
getModel
Get the model property: The model name or Azure OpenAI model deployment name to use for image generation. If not specified, dall-e-2 will be inferred as a default.- Returns:
- the model value.
-
setModel
Set the model property: The model name or Azure OpenAI model deployment name to use for image generation. If not specified, dall-e-2 will be inferred as a default.- Parameters:
model- the model value to set.- Returns:
- the ImageGenerationOptions object itself.
-
getQuality
Get the quality property: The desired image generation quality level to use. Only configurable with dall-e-3 models.- Returns:
- the quality value.
-
setQuality
Set the quality property: The desired image generation quality level to use. Only configurable with dall-e-3 models.- Parameters:
quality- the quality value to set.- Returns:
- the ImageGenerationOptions object itself.
-
getStyle
Get the style property: The desired image generation style to use. Only configurable with dall-e-3 models.- Returns:
- the style value.
-
setStyle
Set the style property: The desired image generation style to use. Only configurable with dall-e-3 models.- Parameters:
style- the style value to set.- Returns:
- the ImageGenerationOptions object itself.
-