Class SynchronousPromptStage
- java.lang.Object
-
- bg.codexio.ai.openai.api.sdk.voice.translation.TranslationConfigurationStage
-
- bg.codexio.ai.openai.api.sdk.voice.translation.SynchronousPromptStage
-
- All Implemented Interfaces:
RuntimeExecutor
public class SynchronousPromptStage extends TranslationConfigurationStage implements RuntimeExecutor
Sends blocking requests to OpenAI API with given user supplied prompt
-
-
Field Summary
-
Fields inherited from class bg.codexio.ai.openai.api.sdk.voice.translation.TranslationConfigurationStage
executor, requestBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description bg.codexio.ai.openai.api.payload.voice.response.SpeechTextResponseguide(String prompt)Guides the translation with additional promptbg.codexio.ai.openai.api.payload.voice.response.SpeechTextResponseunguided()Sends request to OpenAI API without additional prompt
-
-
-
Method Detail
-
guide
public bg.codexio.ai.openai.api.payload.voice.response.SpeechTextResponse guide(String prompt)
Guides the translation with additional prompt- Returns:
SpeechTextResponsethe response from the API in the configured format
-
unguided
public bg.codexio.ai.openai.api.payload.voice.response.SpeechTextResponse unguided()
Sends request to OpenAI API without additional prompt- Returns:
SpeechTextResponsethe response from the API in the configured format
-
-