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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 an IllegalStateException. Defaults to 16384.
      Parameters:
      streamingBufferSize - the buffer size (must be greater than zero)
      Returns:
      this
      Since:
      1.20.0
    • build

      public BedrockStreamingChatModel build()