Package org.springframework.ai.watsonx
Class WatsonxAiChatModel
java.lang.Object
org.springframework.ai.watsonx.WatsonxAiChatModel
- All Implemented Interfaces:
ChatModel
,StreamingChatModel
,Model<Prompt,
,ChatResponse> StreamingModel<Prompt,
ChatResponse>
ChatModel
implementation for watsonx.ai.
watsonx.ai allows developers to use large language models within a SaaS service. It supports multiple open-source models as well as IBM created models.
Please refer to the watsonx.ai models for the most up-to-date information about the available models.
- Since:
- 1.0.0
- Author:
- Pablo Sanchidrian Herrera, John Jario Moreno Rojas, Christian Tzolov
-
Constructor Summary
ConstructorDescriptionWatsonxAiChatModel
(WatsonxAiApi watsonxAiApi) WatsonxAiChatModel
(WatsonxAiApi watsonxAiApi, WatsonxAiChatOptions 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
-
WatsonxAiChatModel
-
WatsonxAiChatModel
-
-
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
-
request
-
getDefaultOptions
- Specified by:
getDefaultOptions
in interfaceChatModel
-