Class BedrockStreamingChatModel.Builder
java.lang.Object
dev.langchain4j.model.bedrock.AbstractBedrockChatModel.AbstractBuilder<BedrockStreamingChatModel.Builder>
dev.langchain4j.model.bedrock.BedrockStreamingChatModel.Builder
- Enclosing class:
BedrockStreamingChatModel
public static class BedrockStreamingChatModel.Builder
extends dev.langchain4j.model.bedrock.AbstractBedrockChatModel.AbstractBuilder<BedrockStreamingChatModel.Builder>
-
Field Summary
Fields inherited from class dev.langchain4j.model.bedrock.AbstractBedrockChatModel.AbstractBuilder
customHeadersSupplier, defaultRequestParameters, listeners, logger, logRequests, logResponses, modelId, region, returnThinking, sendThinking, supportedCapabilities, timeout -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()client(software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeAsyncClient client) streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer for the reactive (Flow.Publisher) streaming path.Methods inherited from class dev.langchain4j.model.bedrock.AbstractBedrockChatModel.AbstractBuilder
customHeaders, customHeaders, defaultRequestParameters, listeners, listeners, logger, logRequests, logResponses, modelId, region, returnThinking, self, sendThinking, supportedCapabilities, supportedCapabilities, timeout
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
client
public BedrockStreamingChatModel.Builder client(software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeAsyncClient client) -
streamingBufferSize
@Experimental public BedrockStreamingChatModel.Builder streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer for the reactive (Flow.Publisher) streaming path. Events from the model are relayed through this buffer; if a subscriber consumes slower than the model produces and the buffer overflows, the stream terminates with anIllegalStateException. Defaults to 16384.- Parameters:
streamingBufferSize- the buffer size (must be greater than zero)- Returns:
this- Since:
- 1.20.0
-
build
-