Class ChatRuntimeSelectionStage
java.lang.Object
bg.codexio.ai.openai.api.sdk.chat.ChatConfigurationStage
bg.codexio.ai.openai.api.sdk.chat.ChatRuntimeSelectionStage
- All Implemented Interfaces:
RuntimeSelectionStage
public class ChatRuntimeSelectionStage
extends ChatConfigurationStage
implements RuntimeSelectionStage
Configures how the HTTP client to act.
Whether the requests will be sent in an immediate blocking manner
(synchronous)
or they will be sent asynchronously via promises or reactive API.
-
Field Summary
Fields inherited from class bg.codexio.ai.openai.api.sdk.chat.ChatConfigurationStage
executor, requestBuilder -
Method Summary
Modifier and TypeMethodDescriptionasync()Requests will be asynchronous with promises.async(Processing processing) Requests will be asynchronous with promises.Requests will be synchronously blocking without streaming enabled.immediate(Processing processing) Requests will be synchronously blocking and might utilize server-sent events (real-time streaming).reactive()Requests will be asynchronous under reactive API.reactive(Processing processing) Requests will be asynchronous under reactive API.
-
Method Details
-
immediate
Requests will be synchronously blocking without streaming enabled.- Specified by:
immediatein interfaceRuntimeSelectionStage- Returns:
ImmediateContextStage
-
immediate
Requests will be synchronously blocking and might utilize server-sent events (real-time streaming).- Parameters:
processing-Processingwhether to use server-sent events- Returns:
ImmediateContextStage
-
async
Requests will be asynchronous with promises. No real-time streaming will be enabled.- Specified by:
asyncin interfaceRuntimeSelectionStage- Returns:
AsyncContextStage
-
async
Requests will be asynchronous with promises. May utilize server-sent events (real-time streaming).- Parameters:
processing-Processingwhether to use server-sent events- Returns:
AsyncContextStage
-
reactive
Requests will be asynchronous under reactive API. Encouraged to be used only if a truly reactive environment is present, such as Reactor Netty. No real-time streaming will be enabled.- Specified by:
reactivein interfaceRuntimeSelectionStage- Returns:
ReactiveContextStage
-
reactive
Requests will be asynchronous under reactive API. Encouraged to be used only if a truly reactive environment is present, such as Reactor Netty. May utilize server-sent events (real-time streaming).- Parameters:
processing-Processingwhether to use server-sent events- Returns:
ReactiveContextStage
-