Class AbstractBedrockStreamingChatModel
java.lang.Object
dev.langchain4j.model.bedrock.internal.AbstractSharedBedrockChatModel
dev.langchain4j.model.bedrock.internal.AbstractBedrockStreamingChatModel
- All Implemented Interfaces:
StreamingChatModel
- Direct Known Subclasses:
BedrockAnthropicStreamingChatModel
public abstract class AbstractBedrockStreamingChatModel
extends AbstractSharedBedrockChatModel
implements StreamingChatModel
Bedrock Streaming chat model
-
Field Summary
Fields inherited from class dev.langchain4j.model.bedrock.internal.AbstractSharedBedrockChatModel
anthropicVersion, ASSISTANT_PROMPT, assistantPrompt, credentialsProvider, DEFAULT_ANTHROPIC_VERSION, HUMAN_PROMPT, humanPrompt, listeners, maxRetries, maxTokens, region, stopSequences, temperature, timeout, topK, topP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
chat
(ChatRequest chatRequest, StreamingChatResponseHandler handler) This is the main API to interact with the chat model.software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeAsyncClient
provider()
Methods inherited from class dev.langchain4j.model.bedrock.internal.AbstractSharedBedrockChatModel
chatMessageToString, convertMessagesToAwsBody, createListenerRequest, createListenerRequest, createListenerResponse, getModelId, getRequestParameters, listenerErrorResponse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.chat.StreamingChatModel
chat, chat, defaultRequestParameters, doChat, supportedCapabilities
-
Constructor Details
-
AbstractBedrockStreamingChatModel
public AbstractBedrockStreamingChatModel()
-
-
Method Details
-
chat
Description copied from interface:StreamingChatModel
This is the main API to interact with the chat model.- Specified by:
chat
in interfaceStreamingChatModel
- Parameters:
chatRequest
- aChatRequest
, containing all the inputs to the LLMhandler
- aStreamingChatResponseHandler
that will handle streaming response from the LLM
-
getAsyncClient
public software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeAsyncClient getAsyncClient() -
listeners
- Specified by:
listeners
in interfaceStreamingChatModel
-
provider
- Specified by:
provider
in interfaceStreamingChatModel
-