Package org.springframework.ai.minimax
Class MiniMaxChatOptions
java.lang.Object
org.springframework.ai.minimax.MiniMaxChatOptions
- All Implemented Interfaces:
ChatOptions,FunctionCallingOptions,ModelOptions
MiniMaxChatOptions represents the options for performing chat completion using the
MiniMax API. It provides methods to set and retrieve various options like model,
frequency penalty, max tokens, etc.
- Since:
- 1.0.0 M1
- Author:
- Geng Rong, Thomas Vitale, Ilayaperumal Gopinathan
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MiniMaxChatOptions.Builderbuilder()Creates a newChatOptions.Builderto create the defaultChatOptions.copy()Returns a copy of thisChatOptions.booleanstatic MiniMaxChatOptionsfromOptions(MiniMaxChatOptions fromOptions) Returns the frequency penalty to use for the chat.Function Callbacks to be registered with the ChatModel.Returns the maximum number of tokens to use for the chat.getModel()Returns the model to use for the chat.getN()Returns the presence penalty to use for the chat.getSeed()getStop()Returns the stop sequences to use for the chat.Returns the temperature to use for the chat.getTools()getTopK()Returns the top K to use for the chat.getTopP()Returns the top P to use for the chat.inthashCode()voidsetFrequencyPenalty(Double frequencyPenalty) voidsetFunctionCallbacks(List<FunctionCallback> functionCallbacks) Set the Function Callbacks to be registered with the ChatModel.voidsetFunctions(Set<String> functionNames) Set the list of function names from the ChatModel registry to be used in the next chat completion requests.voidsetMaskSensitiveInfo(Boolean maskSensitiveInfo) voidsetMaxTokens(Integer maxTokens) voidvoidvoidsetPresencePenalty(Double presencePenalty) voidsetProxyToolCalls(Boolean proxyToolCalls) voidsetResponseFormat(MiniMaxApi.ChatCompletionRequest.ResponseFormat responseFormat) voidvoidvoidsetStopSequences(List<String> stopSequences) voidsetTemperature(Double temperature) voidsetToolChoice(String toolChoice) voidsetToolContext(Map<String, Object> toolContext) voidsetTools(List<MiniMaxApi.FunctionTool> tools) void
-
Constructor Details
-
MiniMaxChatOptions
public MiniMaxChatOptions()
-
-
Method Details
-
builder
Description copied from interface:ChatOptionsCreates a newChatOptions.Builderto create the defaultChatOptions.- Returns:
- Returns
DefaultFunctionCallingOptionsBuilderto create a new instance ofFunctionCallingOptions.
-
fromOptions
-
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
-
getN
-
setN
-
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
-
getResponseFormat
-
setResponseFormat
-
getSeed
-
setSeed
-
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
-
getStop
-
setStop
-
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
-
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
-
getMaskSensitiveInfo
-
setMaskSensitiveInfo
-
getTools
-
setTools
-
getToolChoice
-
setToolChoice
-
getFunctionCallbacks
Description copied from interface:FunctionCallingOptionsFunction Callbacks to be registered with the ChatModel. For Prompt Options the functionCallbacks are automatically enabled for the duration of the prompt execution. For Default Options the FunctionCallbacks are registered but disabled by default. You have to use "functions" property to list the function names from the ChatModel registry to be used in the chat completion requests.- Specified by:
getFunctionCallbacksin interfaceFunctionCallingOptions- Returns:
- Return the Function Callbacks to be registered with the ChatModel.
-
setFunctionCallbacks
Description copied from interface:FunctionCallingOptionsSet the Function Callbacks to be registered with the ChatModel.- Specified by:
setFunctionCallbacksin interfaceFunctionCallingOptions- Parameters:
functionCallbacks- the Function Callbacks to be registered with the ChatModel.
-
getFunctions
- Specified by:
getFunctionsin interfaceFunctionCallingOptions- Returns:
Setof function names from the ChatModel registry to be used in the next chat completion requests.
-
setFunctions
Description copied from interface:FunctionCallingOptionsSet the list of function names from the ChatModel registry to be used in the next chat completion requests.- Specified by:
setFunctionsin interfaceFunctionCallingOptions- Parameters:
functionNames- the list of function names from the ChatModel registry to be used in the next chat completion requests.
-
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
-
getProxyToolCalls
- Specified by:
getProxyToolCallsin interfaceFunctionCallingOptions
-
setProxyToolCalls
- Specified by:
setProxyToolCallsin interfaceFunctionCallingOptions
-
getToolContext
- Specified by:
getToolContextin interfaceFunctionCallingOptions
-
setToolContext
- Specified by:
setToolContextin interfaceFunctionCallingOptions
-
hashCode
public int hashCode() -
equals
-
copy
Description copied from interface:ChatOptionsReturns a copy of thisChatOptions.- Specified by:
copyin interfaceChatOptions- Returns:
- a copy of this
ChatOptions
-