GemmaFormat class
Implementation of the Gemma prompt format (used by Google Gemma/Gemini GGUFs). Format: <start_of_turn>role\ncontent<end_of_turn>
- Inheritance
-
- Object
- PromptFormat
- GemmaFormat
Constructors
- GemmaFormat({String systemPrefix = 'System instruction: '})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- inputSequence → String
-
finalinherited
- outputSequence → String
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stopSequence → String?
-
finalinherited
- systemPrefix → String
-
final
- systemSequence → String
-
finalinherited
- type → PromptFormatType
-
finalinherited
Methods
-
formatMessages(
List< Map< messages) → StringString, dynamic> > -
Formats a list of messages into a full conversation string.
Subclasses should override this for specific logic (e.g. handling newlines or special tags).
override
-
formatPrompt(
String prompt) → String -
Formats a single prompt (User -> Assistant).
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited