Class MiniMaxToolCallParser
java.lang.Object
smile.llm.tool.MiniMaxToolCallParser
- All Implemented Interfaces:
ToolCallParser
Parses MiniMax-M3 tool calls:
]<]minimax[>[<tool_call> ]<]minimax[>[<invoke name="get_weather">]<]minimax[>[<city>Paris]<]minimax[>[</city>]<]minimax[>[</invoke> ]<]minimax[>[</tool_call>
Every tag carries the ]<]minimax[>[ prefix. Parameter values are text; objects are nested
elements and arrays are repeated <item> elements. When the tool definitions are known, a value is
typed from its JSON schema (integer, number, boolean, array, object,
string); without a schema, JSON literals (numbers, booleans, null, objects, arrays) are
decoded and everything else stays a string. Truncated output (token limit) is tolerated: open elements
are closed at the end of the text.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionParser without tool schemas: values are typed heuristically.MiniMaxToolCallParser(ToolDefinition[] tools) Parser that types arguments from the tools' JSON schemas. -
Method Summary
Modifier and TypeMethodDescriptionParses a complete assistant response.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ToolCallParser
parse
-
Field Details
-
NS
-
-
Constructor Details
-
MiniMaxToolCallParser
public MiniMaxToolCallParser()Parser without tool schemas: values are typed heuristically. -
MiniMaxToolCallParser
Parser that types arguments from the tools' JSON schemas.- Parameters:
tools- tool definitions of the request; may benull.
-
-
Method Details
-
parse
Description copied from interface:ToolCallParserParses a complete assistant response.- Specified by:
parsein interfaceToolCallParser- Parameters:
assistantText- decoded generation text.- Returns:
- parse result with optional tool calls.
-