Class AsyncPromiseStage

    • Method Detail

      • then

        public void then​(Consumer<bg.codexio.ai.openai.api.payload.voice.response.SpeechTextResponse> afterAll)
        Sends request in asynchronous fashion, registers a callback to be called when response arrives.
        Parameters:
        afterAll - a callback which accepts the SpeechTextResponse
      • onEachLine

        public void onEachLine​(Consumer<String> onEachLine)
        Sends request in asynchronous fashion, registers a callback to be called on each line of the response
        Parameters:
        onEachLine - a callback which accepts the String line of the response
      • then

        public void then​(Consumer<String> onEachLine,
                         Consumer<bg.codexio.ai.openai.api.payload.voice.response.SpeechTextResponse> afterAll)
        Sends request in asynchronous fashion, registers callbacks to be called when response arrives and on each line of the response
        Parameters:
        onEachLine - a callback which accepts the String line of the response
        afterAll - a callback which accepts the SpeechTextResponse