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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File[]andDownload(File targetFolder)Downloads the image from the successful HTTP response and returns theFileinstance/s.bg.codexio.ai.openai.api.payload.images.response.ImageDataResponseandGetRaw()Returns the whole DTO from the HTTP response that includes the generated image and the additional information, including the useful revised prompt.
-
-
-
Method Detail
-
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
public File[] andDownload(File targetFolder) throws IOException
Downloads the image from the successful HTTP response and returns theFileinstance/s.- Returns:
ImageDataResponse- Throws:
IOException
-
-