Optionalfields: anyModel name to use
Model name to use
Alias for model
Whether to stream the results or not. Defaults to false.
OptionalapiSecret key to use when making requests. Defaults to the value of
MINIMAX_API_KEY environment variable.
OptionalbaseOptionalbeamHow many results to generate; the default is 1 and the maximum is not more than 4. Because beamWidth generates multiple results, it will consume more tokens.
OptionalbotSetting for each robot, only available for pro version.
OptionalcontinueIf it is true, this indicates that the current request is set to continuation mode, and the response is a continuation of the last sentence in the incoming messages; at this time, the last sender is not limited to USER, it can also be BOT. Assuming the last sentence of incoming messages is {"sender_type": " U S E R", "text": "天生我材"}, the completion of the reply may be "It must be useful."
OptionaldefaultDefault bot name
OptionaldefaultDefault user name
OptionalheadersOptionalmaskFor the text information in the output that may involve privacy issues, code masking is currently included but not limited to emails, domains, links, ID numbers, home addresses, etc., with the default being true, that is, code masking is enabled.
OptionalminimaxSecret key to use when making requests. Defaults to the value of
MINIMAX_API_KEY environment variable.
Alias for apiKey
OptionalminimaxAPI key to use when making requests. Defaults to the value of
MINIMAX_GROUP_ID environment variable.
OptionalprefixOptionalproEnable Chatcompletion pro
OptionalpromptDialogue setting, characters, or functionality setting.
OptionalreplyOptionalroleDialogue Metadata
OptionalskipSensitize text information in the output that may involve privacy issues, currently including but not limited to emails, domain names, links, ID numbers, home addresses, etc. Default false, ie. enable sensitization.
OptionaltemperatureAmount of randomness injected into the response. Ranges from 0 to 1 (0 is not included). Use temp closer to 0 for analytical / multiple choice, and temp closer to 1 for creative and generative tasks. Defaults to 0.95.
OptionaltokensPay attention to the maximum number of tokens generated, this parameter does not affect the generation effect of the model itself, but only realizes the function by truncating the tokens exceeding the limit. It is necessary to ensure that the number of tokens of the input context plus this value is less than 6144 or 16384, otherwise the request will fail.
OptionaltopPThe smaller the sampling method, the more determinate the result; the larger the number, the more random the result.
OptionaluseWhether to use the standard SSE format, when set to true, the streaming results will be separated by two line breaks. This parameter only takes effect when stream is set to true.
Get the identifying parameters for the model
Optionalbeam_Optionalbot_Optionalfunctions?: Function[]A list of functions the model may generate JSON inputs for.
Optionalmask_Optionalplugins?: string[]Optionalprompt?: stringOptionalreply_Optionalrole_Optionalsample_Optionalskip_Optionalstream?: booleanOptionaltemperature?: numberOptionaltokens_Optionaltop_Optionaluse_
Wrapper around Minimax large language models that use the Chat endpoint.
To use you should have the
MINIMAX_GROUP_IDandMINIMAX_API_KEYenvironment variable set.Example