MiniMaxFormatter
public class MiniMaxFormatter extends OpenAIChatFormatter
源码Source
io/agentscope/extensions/model/openai/compat/minimax/MiniMaxFormatter.java:29–88用于MiniMax OpenAI 兼容的聊天补全的格式化器。位于 io.agentscope.extensions.model.openai.compat.minimax 包,继承自 OpenAIChatFormatter。核心成员包括 applyOptions、applyMaxTokens、applyToolChoice、supportsStrict。
Formatter for MiniMax OpenAI-compatible chat completions.
MiniMax Chat Completions API.
方法摘要Method Summary
方法详情Method Detail
applyOptions
public void applyOptions(OpenAIRequest request, GenerateOptions options, GenerateOptions defaultOptions)
应用选项。
Performs the apply options operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
request | OpenAIRequest | 请求(类型 `OpenAIRequest`)。The request. |
options | GenerateOptions | 选项(类型 `GenerateOptions`)。The options. |
defaultOptions | GenerateOptions | 默认选项(类型 `GenerateOptions`)。The default options. |
源码Source
io/agentscope/extensions/model/openai/compat/minimax/MiniMaxFormatter.java:31–38applyMaxTokens
protected void applyMaxTokens(OpenAIRequest request, GenerateOptions options, GenerateOptions defaultOptions)
应用最大令牌数。
Performs the apply max tokens operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
request | OpenAIRequest | 请求(类型 `OpenAIRequest`)。The request. |
options | GenerateOptions | 选项(类型 `GenerateOptions`)。The options. |
defaultOptions | GenerateOptions | 默认选项(类型 `GenerateOptions`)。The default options. |
源码Source
io/agentscope/extensions/model/openai/compat/minimax/MiniMaxFormatter.java:40–48applyToolChoice
public void applyToolChoice(OpenAIRequest request, ToolChoice toolChoice)
应用工具选项。
Performs the apply tool choice operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
request | OpenAIRequest | 请求(类型 `OpenAIRequest`)。The request. |
toolChoice | ToolChoice | 工具选项(类型 `ToolChoice`)。The tool choice. |
源码Source
io/agentscope/extensions/model/openai/compat/minimax/MiniMaxFormatter.java:50–53supportsStrict
protected boolean supportsStrict()
返回 supportsStrict 结果。
Returns the supports strict.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/extensions/model/openai/compat/minimax/MiniMaxFormatter.java:55–58