MistralChatTemplate class

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

Constructors

MistralChatTemplate()
Creates a MistralChatTemplate.
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 optional tools) into a Mistral prompt.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

availableToolsEnd → const String
availableToolsStart → const String
Tool markers.
eos → const String
instEnd → const String
instStart → const String
Instruction wrappers.
mediaMarker → const String
The shared mtmd media marker; one is emitted per attached image.
stopSequences → const List<String>
Stop sequence: </s> ends an assistant turn.
toolCalls → const String
toolResultsEnd → const String
toolResultsStart → const String