Class SynchronousExecutor<R extends bg.codexio.ai.openai.api.payload.images.request.ImageRequest>
java.lang.Object
bg.codexio.ai.openai.api.sdk.images.ImageConfigurationStage<R>
bg.codexio.ai.openai.api.sdk.images.SynchronousExecutor<R>
- All Implemented Interfaces:
RuntimeExecutor
public class SynchronousExecutor<R extends bg.codexio.ai.openai.api.payload.images.request.ImageRequest>
extends ImageConfigurationStage<R>
implements RuntimeExecutor
Synchronous context to choose between raw response, just
a simple string answer, or an image download
-
Field Summary
Fields inherited from class bg.codexio.ai.openai.api.sdk.images.ImageConfigurationStage
builder, executor -
Method Summary
Modifier and TypeMethodDescriptionFile[]andDownload(File targetFolder) Downloads the image from the successful HTTP response and returns theFileinstance/s.bg.codexio.ai.openai.api.payload.images.response.ImageDataResponseReturns the whole DTO from the HTTP response that includes the generated image and the additional information, including the useful revised prompt.
-
Method Details
-
andGetRaw
public bg.codexio.ai.openai.api.payload.images.response.ImageDataResponse andGetRaw()Returns the whole DTO from the HTTP response that includes the generated image and the additional information, including the useful revised prompt.- Returns:
ImageDataResponse
-
andDownload
Downloads the image from the successful HTTP response and returns theFileinstance/s.- Returns:
ImageDataResponse- Throws:
IOException
-