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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncContextStageasync()Requests will be asynchronous with promises.AsyncContextStageasync(Processing processing)Requests will be asynchronous with promises.ImmediateContextStageimmediate()Requests will be synchronously blocking without streaming enabled.ImmediateContextStageimmediate(Processing processing)Requests will be synchronously blocking and might utilize server-sent events (real-time streaming).ReactiveContextStagereactive()Requests will be asynchronous under reactive API.ReactiveContextStagereactive(Processing processing)Requests will be asynchronous under reactive API.
-
-
-
Method Detail
-
immediate
public ImmediateContextStage immediate()
Requests will be synchronously blocking without streaming enabled.- Specified by:
immediatein interfaceRuntimeSelectionStage- Returns:
ImmediateContextStage
-
immediate
public ImmediateContextStage immediate(Processing processing)
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
public AsyncContextStage async()
Requests will be asynchronous with promises. No real-time streaming will be enabled.- Specified by:
asyncin interfaceRuntimeSelectionStage- Returns:
AsyncContextStage
-
async
public AsyncContextStage async(Processing processing)
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
public 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. No real-time streaming will be enabled.- Specified by:
reactivein interfaceRuntimeSelectionStage- Returns:
ReactiveContextStage
-
reactive
public ReactiveContextStage reactive(Processing processing)
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
-
-