Personality class sealed
A model-owned style preset to apply to a request.
Omit the personality to use the model's default style. Values must be at most 64 characters; the server rejects longer values.
Known presets are available as variants:
- FriendlyPersonality (
Personality.friendly()) - PragmaticPersonality (
Personality.pragmatic())
The set of supported presets may expand over time; use
CustomPersonality (Personality.custom(...)) for any value not yet
modeled as a known preset.
Example
final friendly = Personality.friendly();
final custom = Personality.custom('concise');
- Implementers
- Annotations
-
- @immutable
Constructors
- Personality.custom(String value)
-
A custom style preset with the given
value.constfactory - Personality.friendly()
-
The friendly style preset.
constfactory
- Personality.fromJson(String json)
-
Creates a Personality from a JSON value.
factory
- Personality.pragmatic()
-
The pragmatic style preset.
constfactory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String - Converts to JSON value.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited