Class ReactiveExecutor<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.ReactiveExecutor<R>
All Implemented Interfaces:
RuntimeExecutor

public class ReactiveExecutor<R extends bg.codexio.ai.openai.api.payload.images.request.ImageRequest> extends ImageConfigurationStage<R> implements RuntimeExecutor
Reactive context to choose if the response image should be automatically downloaded or just delivered. Strongly recommended to use this only if a true reactive runtime is present, such as Reactor Netty.
  • Method Details

    • get

      public reactor.core.publisher.Mono<bg.codexio.ai.openai.api.payload.images.response.ImageDataResponse> get()
      Returns:
      Mono of the ImageDataResponse of the response received from the HTTP request
    • download

      public reactor.core.publisher.Flux<File> download(File targetFolder)
      Parameters:
      targetFolder - the desired location for downloading the file from the response
      Returns:
      Flux of the File that has been saved in the provided location