Interface OpenAiImageModelConfig
- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
OpenAiImageModelConfig.BuilderBase.OpenAiImageModelConfigImpl
Configuration for the OpenAI image model,
OpenAiImageModel
.
Provides methods for setting up and managing properties related to OpenAI API requests.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Fluent API builder forOpenAiImageModelConfig
.static class
OpenAiImageModelConfig.BuilderBase<BUILDER extends OpenAiImageModelConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends OpenAiImageModelConfig> Fluent API builder base forOpenAiImageModelConfig
. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionapiKey()
The API key used to authenticate requests to the OpenAI API.baseUrl()
The base URL for the OpenAI API.builder()
Create a new fluent API builder to customize configuration.builder
(OpenAiImageModelConfig instance) Create a new fluent API builder from an existing instance.static OpenAiImageModelConfig
create()
Create a new instance with default values.static OpenAiImageModelConfig
Create a new instance from configuration.A map containing custom headers.boolean
enabled()
If set tofalse
(default), OpenAI model will not be available even if configured.Whether to log API requests.Whether to log API responses.The maximum number of retries for failed API requests.The model name to use (e.g., "gpt-3.5-turbo").The ID of the organization for API requests.The path or location where the generated images should be persisted.proxy()
Proxy to use.quality()
The quality of the generated images.The format of the response.size()
The desired size of the generated images.style()
The style of the generated images.timeout()
The timeout setting for API requests.user()
The unique identifier for the user making the request.The flag to indicate whether to persist the generated images.
-
Field Details
-
CONFIG_ROOT
Default configuration prefix.- See Also:
-
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
maxRetries
The maximum number of retries for failed API requests.- Returns:
- an
Optional
containing the maximum number of retries
-
size
The desired size of the generated images.- Returns:
- the image size.
-
quality
The quality of the generated images.- Returns:
- the image quality.
-
style
The style of the generated images.- Returns:
- the image style.
-
user
The unique identifier for the user making the request.- Returns:
- the user ID.
-
responseFormat
The format of the response.- Returns:
- the response format.
-
withPersisting
The flag to indicate whether to persist the generated images.- Returns:
- the persist flag.
-
persistTo
The path or location where the generated images should be persisted.- Returns:
- the persist path.
-
enabled
boolean enabled()If set tofalse
(default), OpenAI model will not be available even if configured.- Returns:
- whether OpenAI model is enabled, defaults to
false
-
baseUrl
The base URL for the OpenAI API.- Returns:
- the base URL
-
apiKey
The API key used to authenticate requests to the OpenAI API.- Returns:
- an
Optional
containing the API key
-
logRequests
Whether to log API requests.- Returns:
- an
Optional
containing true if requests should be logged, false otherwise
-
logResponses
Whether to log API responses.- Returns:
- an
Optional
containing true if responses should be logged, false otherwise
-
customHeaders
A map containing custom headers.- Returns:
- custom headers map
-
timeout
The timeout setting for API requests.- Returns:
- the timeout setting in
Duration.parse(java.lang.CharSequence)
format
-
proxy
Proxy to use.- Returns:
- an
Optional
containing HTTP proxy to use
-
organizationId
The ID of the organization for API requests.- Returns:
- organization ID
-
modelName
The model name to use (e.g., "gpt-3.5-turbo").- Returns:
- the model name
-