QwenChatTemplate class

Renders Qwen prompts from M.E.AI chat messages and tool declarations.

Constructors

QwenChatTemplate()
Creates a QwenChatTemplate.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(String generated) ParsedTurn
Parses one raw generated turn into prose plus any tool calls.
render(Iterable<ChatMessage> messages, {Iterable<AIFunctionDeclaration> tools = const <AIFunctionDeclaration>[], bool enableThinking = true, bool addGenerationPrompt = true}) RenderedPrompt
Renders messages (with optional tools) into a Qwen prompt.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

imEnd → const String
imStart → const String
Turn boundary markers.
mediaMarker → const String
The shared mtmd media marker; one is emitted per attached image.
stopSequences → const List<String>
Stop sequence: <|im_end|> ends every turn.
thinkClose → const String
thinkOpen → const String
Reasoning-channel markers (Qwen3).
toolResponseClose → const String
toolResponseOpen → const String
Tool-response wrapper inside a tool turn.