Package org.springframework.ai.openai
Class OpenAiImageOptions
java.lang.Object
org.springframework.ai.openai.AbstractOpenAiOptions
org.springframework.ai.openai.OpenAiImageOptions
- All Implemented Interfaces:
ImageOptions,ModelOptions
Configuration information for the Image Model implementation using the OpenAI Java SDK.
- Author:
- Julien Dubois, Christian Tzolov, Mark Pollack
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.springframework.ai.openai.AbstractOpenAiOptions
AbstractOpenAiOptions.AbstractBuilder<O extends AbstractOpenAiOptions,B extends AbstractOpenAiOptions.AbstractBuilder<O, B>> -
Field Summary
FieldsFields inherited from class org.springframework.ai.openai.AbstractOpenAiOptions
DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOpenAiImageOptions(@Nullable String baseUrl, @Nullable String apiKey, @Nullable com.openai.credential.Credential credential, @Nullable String model, @Nullable String microsoftDeploymentName, @Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion, @Nullable String organizationId, @Nullable Boolean isMicrosoftFoundry, @Nullable Boolean isGitHubModels, @Nullable Duration timeout, @Nullable Integer maxRetries, @Nullable Proxy proxy, @Nullable Map<String, String> customHeaders, @Nullable Integer n, @Nullable Integer width, @Nullable Integer height, @Nullable String quality, @Nullable String responseFormat, @Nullable String size, @Nullable String style, @Nullable String user) -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenAiImageOptions.Builderbuilder()boolean@Nullable Integer@Nullable IntegergetN()@Nullable String@Nullable String@Nullable StringgetSize()@Nullable StringgetStyle()@Nullable StringgetUser()@Nullable IntegergetWidth()inthashCode()com.openai.models.images.ImageGenerateParamstoOpenAiImageGenerateParams(ImagePrompt imagePrompt) Methods inherited from class org.springframework.ai.openai.AbstractOpenAiOptions
getApiKey, getBaseUrl, getCredential, getCustomHeaders, getDeploymentName, getMaxRetries, getMicrosoftDeploymentName, getMicrosoftFoundryServiceVersion, getModel, getOrganizationId, getProxy, getTimeout, isGitHubModels, isMicrosoftFoundryMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.image.ImageOptions
getModel
-
Field Details
-
DEFAULT_IMAGE_MODEL
-
-
Constructor Details
-
OpenAiImageOptions
protected OpenAiImageOptions(@Nullable String baseUrl, @Nullable String apiKey, @Nullable com.openai.credential.Credential credential, @Nullable String model, @Nullable String microsoftDeploymentName, @Nullable com.openai.azure.AzureOpenAIServiceVersion microsoftFoundryServiceVersion, @Nullable String organizationId, @Nullable Boolean isMicrosoftFoundry, @Nullable Boolean isGitHubModels, @Nullable Duration timeout, @Nullable Integer maxRetries, @Nullable Proxy proxy, @Nullable Map<String, String> customHeaders, @Nullable Integer n, @Nullable Integer width, @Nullable Integer height, @Nullable String quality, @Nullable String responseFormat, @Nullable String size, @Nullable String style, @Nullable String user)
-
-
Method Details
-
builder
-
getN
- Specified by:
getNin interfaceImageOptions
-
getWidth
- Specified by:
getWidthin interfaceImageOptions
-
getHeight
- Specified by:
getHeightin interfaceImageOptions
-
getResponseFormat
- Specified by:
getResponseFormatin interfaceImageOptions
-
getSize
-
getUser
-
getQuality
-
getStyle
- Specified by:
getStylein interfaceImageOptions
-
equals
-
hashCode
public int hashCode() -
toOpenAiImageGenerateParams
public com.openai.models.images.ImageGenerateParams toOpenAiImageGenerateParams(ImagePrompt imagePrompt)
-