Class AbstractBedrockStreamingChatModel
java.lang.Object
dev.langchain4j.model.bedrock.internal.AbstractSharedBedrockChatModel
dev.langchain4j.model.bedrock.internal.AbstractBedrockStreamingChatModel
- All Implemented Interfaces:
StreamingChatLanguageModel
- Direct Known Subclasses:
BedrockAnthropicStreamingChatModel
public abstract class AbstractBedrockStreamingChatModel
extends AbstractSharedBedrockChatModel
implements StreamingChatLanguageModel
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, createModelListenerRequest, createModelListenerRequest, createModelListenerResponse, 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.StreamingChatLanguageModel
chat, chat, defaultRequestParameters, doChat, supportedCapabilities
-
Constructor Details
-
AbstractBedrockStreamingChatModel
public AbstractBedrockStreamingChatModel()
-
-
Method Details
-
chat
Description copied from interface:StreamingChatLanguageModel
This is the main API to interact with the chat model.A temporary default implementation of this method is necessary until all
StreamingChatLanguageModel
implementations adopt it. It should be removed once that occurs.- Specified by:
chat
in interfaceStreamingChatLanguageModel
- 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 interfaceStreamingChatLanguageModel
-
provider
- Specified by:
provider
in interfaceStreamingChatLanguageModel
-