Package org.springframework.ai.minimax
Class MiniMaxChatOptions
java.lang.Object
org.springframework.ai.minimax.MiniMaxChatOptions
- All Implemented Interfaces:
ChatOptions
,ModelOptions
,ToolCallingChatOptions
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 -
Field Summary
Fields inherited from interface org.springframework.ai.model.tool.ToolCallingChatOptions
DEFAULT_TOOL_EXECUTION_ENABLED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MiniMaxChatOptions.Builder
builder()
A builder to create a newToolCallingChatOptions
instance.copy()
Returns a copy of thisChatOptions
.boolean
static MiniMaxChatOptions
fromOptions
(MiniMaxChatOptions fromOptions) Returns the frequency penalty to use for the chat.Whether theChatModel
is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.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.ToolCallbacks to be registered with the ChatModel.Get the configured tool context.Names of the tools to register with the ChatModel.getTools()
getTopK()
Returns the top K to use for the chat.getTopP()
Returns the top P to use for the chat.int
hashCode()
void
setFrequencyPenalty
(Double frequencyPenalty) void
setInternalToolExecutionEnabled
(Boolean internalToolExecutionEnabled) Set whether theChatModel
is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.void
setMaskSensitiveInfo
(Boolean maskSensitiveInfo) void
setMaxTokens
(Integer maxTokens) void
void
void
setPresencePenalty
(Double presencePenalty) void
setResponseFormat
(MiniMaxApi.ChatCompletionRequest.ResponseFormat responseFormat) void
void
void
setStopSequences
(List<String> stopSequences) void
setTemperature
(Double temperature) void
setToolCallbacks
(List<ToolCallback> toolCallbacks) Set the ToolCallbacks to be registered with the ChatModel.void
setToolChoice
(String toolChoice) void
setToolContext
(Map<String, Object> toolContext) Set the tool context values as map.void
setToolNames
(Set<String> toolNames) Set the names of the tools to register with the ChatModel.void
setTools
(List<MiniMaxApi.FunctionTool> tools) void
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.ai.model.tool.ToolCallingChatOptions
isInternalToolExecutionEnabled
-
Constructor Details
-
MiniMaxChatOptions
public MiniMaxChatOptions()
-
-
Method Details
-
builder
Description copied from interface:ToolCallingChatOptions
A builder to create a newToolCallingChatOptions
instance.- Returns:
- Returns a new
ChatOptions.Builder
.
-
fromOptions
-
getModel
Description copied from interface:ChatOptions
Returns the model to use for the chat.- Specified by:
getModel
in interfaceChatOptions
- Returns:
- the model to use for the chat
-
setModel
-
getFrequencyPenalty
Description copied from interface:ChatOptions
Returns the frequency penalty to use for the chat.- Specified by:
getFrequencyPenalty
in interfaceChatOptions
- Returns:
- the frequency penalty to use for the chat
-
setFrequencyPenalty
-
getMaxTokens
Description copied from interface:ChatOptions
Returns the maximum number of tokens to use for the chat.- Specified by:
getMaxTokens
in interfaceChatOptions
- Returns:
- the maximum number of tokens to use for the chat
-
setMaxTokens
-
getN
-
setN
-
getPresencePenalty
Description copied from interface:ChatOptions
Returns the presence penalty to use for the chat.- Specified by:
getPresencePenalty
in interfaceChatOptions
- Returns:
- the presence penalty to use for the chat
-
setPresencePenalty
-
getResponseFormat
-
setResponseFormat
-
getSeed
-
setSeed
-
getStopSequences
Description copied from interface:ChatOptions
Returns the stop sequences to use for the chat.- Specified by:
getStopSequences
in interfaceChatOptions
- Returns:
- the stop sequences to use for the chat
-
setStopSequences
-
getStop
-
setStop
-
getTemperature
Description copied from interface:ChatOptions
Returns the temperature to use for the chat.- Specified by:
getTemperature
in interfaceChatOptions
- Returns:
- the temperature to use for the chat
-
setTemperature
-
getTopP
Description copied from interface:ChatOptions
Returns the top P to use for the chat.- Specified by:
getTopP
in interfaceChatOptions
- Returns:
- the top P to use for the chat
-
setTopP
-
getMaskSensitiveInfo
-
setMaskSensitiveInfo
-
getTools
-
setTools
-
getToolChoice
-
setToolChoice
-
getTopK
Description copied from interface:ChatOptions
Returns the top K to use for the chat.- Specified by:
getTopK
in interfaceChatOptions
- Returns:
- the top K to use for the chat
-
getToolCallbacks
Description copied from interface:ToolCallingChatOptions
ToolCallbacks to be registered with the ChatModel.- Specified by:
getToolCallbacks
in interfaceToolCallingChatOptions
-
setToolCallbacks
Description copied from interface:ToolCallingChatOptions
Set the ToolCallbacks to be registered with the ChatModel.- Specified by:
setToolCallbacks
in interfaceToolCallingChatOptions
-
getToolNames
Description copied from interface:ToolCallingChatOptions
Names of the tools to register with the ChatModel.- Specified by:
getToolNames
in interfaceToolCallingChatOptions
-
setToolNames
Description copied from interface:ToolCallingChatOptions
Set the names of the tools to register with the ChatModel.- Specified by:
setToolNames
in interfaceToolCallingChatOptions
-
getInternalToolExecutionEnabled
Description copied from interface:ToolCallingChatOptions
Whether theChatModel
is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.- Specified by:
getInternalToolExecutionEnabled
in interfaceToolCallingChatOptions
-
setInternalToolExecutionEnabled
Description copied from interface:ToolCallingChatOptions
Set whether theChatModel
is responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.- Specified by:
setInternalToolExecutionEnabled
in interfaceToolCallingChatOptions
-
getToolContext
Description copied from interface:ToolCallingChatOptions
Get the configured tool context.- Specified by:
getToolContext
in interfaceToolCallingChatOptions
- Returns:
- the tool context map.
-
setToolContext
Description copied from interface:ToolCallingChatOptions
Set the tool context values as map.- Specified by:
setToolContext
in interfaceToolCallingChatOptions
- Parameters:
toolContext
- as map
-
hashCode
public int hashCode() -
equals
-
copy
Description copied from interface:ChatOptions
Returns a copy of thisChatOptions
.- Specified by:
copy
in interfaceChatOptions
- Returns:
- a copy of this
ChatOptions
-