Class BedrockTitanChatModel
java.lang.Object
org.springframework.ai.bedrock.titan.BedrockTitanChatModel
- All Implemented Interfaces:
ChatModel
,StreamingChatModel
,Model<Prompt,
,ChatResponse> StreamingModel<Prompt,
ChatResponse>
Implementation of the
ChatModel
and StreamingChatModel
interfaces that
uses the Titan Chat API.- Since:
- 0.8.0
- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorDescriptionBedrockTitanChatModel
(TitanChatBedrockApi chatApi) BedrockTitanChatModel
(TitanChatBedrockApi chatApi, BedrockTitanChatOptions defaultOptions) -
Method Summary
Modifier and TypeMethodDescriptionExecutes a method call to the AI model.reactor.core.publisher.Flux<ChatResponse>
Executes a method call to the AI model.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.ai.chat.model.StreamingChatModel
stream, stream
-
Constructor Details
-
BedrockTitanChatModel
-
BedrockTitanChatModel
-
-
Method Details
-
call
Description copied from interface:Model
Executes a method call to the AI model. -
stream
Description copied from interface:StreamingModel
Executes a method call to the AI model.- Specified by:
stream
in interfaceChatModel
- Specified by:
stream
in interfaceStreamingChatModel
- Specified by:
stream
in interfaceStreamingModel<Prompt,
ChatResponse> - Parameters:
prompt
- the request object to be sent to the AI model- Returns:
- the streaming response from the AI model
-
getDefaultOptions
- Specified by:
getDefaultOptions
in interfaceChatModel
-