ChatmlChatTemplate class
Renders ChatML prompts from M.E.AI chat messages and tool declarations.
Constructors
- ChatmlChatTemplate()
-
Creates a ChatmlChatTemplate.
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 addGenerationPrompt = true}) → RenderedPrompt -
Renders
messages(with optionaltools) into a ChatML 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.