Class SynchronousExecutor<R extends bg.codexio.ai.openai.api.payload.images.request.ImageRequest>

  • 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
    • 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 the File instance/s.
        Returns:
        ImageDataResponse
        Throws:
        IOException