Class AsyncPromise
java.lang.Object
bg.codexio.ai.openai.api.sdk.vision.VisionConfigurationStage
bg.codexio.ai.openai.api.sdk.vision.AsyncPromise
Async promise to choose between raw response or just
a simple string answer.
-
Field Summary
Fields inherited from class bg.codexio.ai.openai.api.sdk.vision.VisionConfigurationStage
executor, requestContext -
Method Summary
Modifier and TypeMethodDescriptionvoidonEachLine(Consumer<String> onEachLine) Subscribe to each line (whether streamed or from the whole response)voidSubscribe to the whole response when all lines are supplied.voidthen(Consumer<bg.codexio.ai.openai.api.payload.chat.response.ChatMessageResponse> afterAll, Consumer<String> onEachLine) Subscribe both to each line (whether streamed or from the whole response) and to the whole response when all lines are supplied.
-
Method Details
-
then
public void then(Consumer<bg.codexio.ai.openai.api.payload.chat.response.ChatMessageResponse> afterAll, Consumer<String> onEachLine) Subscribe both to each line (whether streamed or from the whole response) and to the whole response when all lines are supplied.- Parameters:
afterAll- callback that accepts theChatMessageResponseonEachLine- callback that accepts each response line as a string
-
onEachLine
Subscribe to each line (whether streamed or from the whole response)- Parameters:
onEachLine- callback that accepts each response line as a string
-
then
public void then(Consumer<bg.codexio.ai.openai.api.payload.chat.response.ChatMessageResponse> afterAll) Subscribe to the whole response when all lines are supplied.- Parameters:
afterAll- callback that accepts theChatMessageResponse
-