GemmaChatFormat class

Gemma 4's ChatFormat: GemmaChatTemplate rendering paired with GemmaStreamDecoder output splitting.

Implemented types

Constructors

GemmaChatFormat()
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
supportsThinking bool
Whether this family has a dedicated reasoning ("thinking") channel.
no setteroverride

Methods

decode(Stream<String> tokens) Stream<ChatResponseUpdate>
Splits a raw generated-token stream into M.E.AI updates, separating prose (TextContent), reasoning (TextReasoningContent), and tool calls (FunctionCallContent).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Iterable<ChatMessage> messages, {Iterable<AIFunctionDeclaration> tools = const <AIFunctionDeclaration>[], bool enableThinking = false}) RenderedPrompt
Renders messages (with optional tools) into the family's wire format.
override
toString() String
A string representation of this object.
inherited

Operators

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