Class AsyncPromiseStage
java.lang.Object
bg.codexio.ai.openai.api.sdk.voice.translation.TranslationConfigurationStage
bg.codexio.ai.openai.api.sdk.voice.translation.AsyncPromiseStage
Registers callbacks and sends request
-
Field Summary
Fields inherited from class bg.codexio.ai.openai.api.sdk.voice.translation.TranslationConfigurationStage
executor, requestBuilder -
Method Summary
Modifier and TypeMethodDescriptionvoidonEachLine(Consumer<String> onEachLine) Sends request in asynchronous fashion, registers a callback to be called on each line of the responsevoidSends request in asynchronous fashion, registers a callback to be called when response arrives.voidthen(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
-
Method Details
-
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 theSpeechTextResponse
-
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 responseafterAll- a callback which accepts theSpeechTextResponse
-