Class DefaultChatOptions
java.lang.Object
org.springframework.ai.chat.prompt.DefaultChatOptions
- All Implemented Interfaces:
ChatOptions,ModelOptions
Default implementation for the
ChatOptions.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.ai.chat.prompt.ChatOptions
ChatOptions.Builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends ChatOptions>
Tcopy()Returns a copy of thisChatOptions.@Nullable DoubleReturns the frequency penalty to use for the chat.@Nullable IntegerReturns the maximum number of tokens to use for the chat.@Nullable StringgetModel()Returns the model to use for the chat.@Nullable DoubleReturns the presence penalty to use for the chat.Returns the stop sequences to use for the chat.@Nullable DoubleReturns the temperature to use for the chat.@Nullable IntegergetTopK()Returns the top K to use for the chat.@Nullable DoublegetTopP()Returns the top P to use for the chat.voidsetFrequencyPenalty(Double frequencyPenalty) voidsetMaxTokens(Integer maxTokens) voidvoidsetPresencePenalty(Double presencePenalty) voidsetStopSequences(List<String> stopSequences) voidsetTemperature(Double temperature) voidvoid
-
Constructor Details
-
DefaultChatOptions
public DefaultChatOptions()
-
-
Method Details
-
getModel
Description copied from interface:ChatOptionsReturns the model to use for the chat.- Specified by:
getModelin interfaceChatOptions- Returns:
- the model to use for the chat
-
setModel
-
getFrequencyPenalty
Description copied from interface:ChatOptionsReturns the frequency penalty to use for the chat.- Specified by:
getFrequencyPenaltyin interfaceChatOptions- Returns:
- the frequency penalty to use for the chat
-
setFrequencyPenalty
-
getMaxTokens
Description copied from interface:ChatOptionsReturns the maximum number of tokens to use for the chat.- Specified by:
getMaxTokensin interfaceChatOptions- Returns:
- the maximum number of tokens to use for the chat
-
setMaxTokens
-
getPresencePenalty
Description copied from interface:ChatOptionsReturns the presence penalty to use for the chat.- Specified by:
getPresencePenaltyin interfaceChatOptions- Returns:
- the presence penalty to use for the chat
-
setPresencePenalty
-
getStopSequences
Description copied from interface:ChatOptionsReturns the stop sequences to use for the chat.- Specified by:
getStopSequencesin interfaceChatOptions- Returns:
- the stop sequences to use for the chat
-
setStopSequences
-
getTemperature
Description copied from interface:ChatOptionsReturns the temperature to use for the chat.- Specified by:
getTemperaturein interfaceChatOptions- Returns:
- the temperature to use for the chat
-
setTemperature
-
getTopK
Description copied from interface:ChatOptionsReturns the top K to use for the chat.- Specified by:
getTopKin interfaceChatOptions- Returns:
- the top K to use for the chat
-
setTopK
-
getTopP
Description copied from interface:ChatOptionsReturns the top P to use for the chat.- Specified by:
getTopPin interfaceChatOptions- Returns:
- the top P to use for the chat
-
setTopP
-
copy
Description copied from interface:ChatOptionsReturns a copy of thisChatOptions.- Specified by:
copyin interfaceChatOptions- Returns:
- a copy of this
ChatOptions
-