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:

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.
const
factory
Personality.friendly()
The friendly style preset.
const
factory
Personality.fromJson(String json)
Creates a Personality from a JSON value.
factory
Personality.pragmatic()
The pragmatic style preset.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
The raw string value for this personality.
no setter

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