Package org.springframework.ai.watsonx
Class WatsonxAiChatOptions
java.lang.Object
org.springframework.ai.watsonx.WatsonxAiChatOptions
- All Implemented Interfaces:
ChatOptions
,ModelOptions
Helper class for creating watsonx.ai options.
- Since:
- 1.0.0
- Author:
- Pablo Sanchidrian Herrera, John Jairo Moreno Rojas, Thomas Vitale
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdditionalProperty
(String key, Object value) static WatsonxAiChatOptions.Builder
builder()
copy()
filterNonSupportedFields
(Map<String, Object> options) Filter out the non-supported fields from the options.static WatsonxAiChatOptions
fromOptions
(WatsonxAiChatOptions fromOptions) getModel()
getTopK()
getTopP()
void
setDecodingMethod
(String decodingMethod) void
setMaxNewTokens
(Integer maxNewTokens) void
setMaxTokens
(Integer maxTokens) void
setMinNewTokens
(Integer minNewTokens) void
void
setPresencePenalty
(Double presencePenalty) void
setRandomSeed
(Integer randomSeed) void
setRepetitionPenalty
(Double repetitionPenalty) void
setStopSequences
(List<String> stopSequences) void
setTemperature
(Double temperature) void
void
toMap()
Convert theWatsonxAiChatOptions
object to aMap
of key/value pairs.
-
Constructor Details
-
WatsonxAiChatOptions
public WatsonxAiChatOptions()
-
-
Method Details
-
getTemperature
- Specified by:
getTemperature
in interfaceChatOptions
-
setTemperature
-
getTopP
- Specified by:
getTopP
in interfaceChatOptions
-
setTopP
-
getTopK
- Specified by:
getTopK
in interfaceChatOptions
-
setTopK
-
getDecodingMethod
-
setDecodingMethod
-
getMaxTokens
- Specified by:
getMaxTokens
in interfaceChatOptions
-
setMaxTokens
-
getMaxNewTokens
-
setMaxNewTokens
-
getMinNewTokens
-
setMinNewTokens
-
getStopSequences
- Specified by:
getStopSequences
in interfaceChatOptions
-
setStopSequences
-
getPresencePenalty
- Specified by:
getPresencePenalty
in interfaceChatOptions
-
setPresencePenalty
-
getRepetitionPenalty
-
setRepetitionPenalty
-
getRandomSeed
-
setRandomSeed
-
getModel
- Specified by:
getModel
in interfaceChatOptions
-
setModel
-
getAdditionalProperties
-
addAdditionalProperty
-
getFrequencyPenalty
- Specified by:
getFrequencyPenalty
in interfaceChatOptions
-
builder
-
toMap
Convert theWatsonxAiChatOptions
object to aMap
of key/value pairs.- Returns:
- The
Map
of key/value pairs.
-
filterNonSupportedFields
Filter out the non-supported fields from the options.- Parameters:
options
- The options to filter.- Returns:
- The filtered options.
-
copy
- Specified by:
copy
in interfaceChatOptions
-
fromOptions
-