FinishReason enum

Reason why a model stopped generating tokens.

Inheritance
Available extensions

Values

unknown → const FinishReason

Default value to use when a finish reason isn't set.

Never used as the reason for finishing.

const FinishReason('UNKNOWN')
stop → const FinishReason

Natural stop point of the model or provided stop sequence.

const FinishReason('STOP')
maxTokens → const FinishReason

The maximum number of tokens as specified in the request was reached.

const FinishReason('MAX_TOKENS')
safety → const FinishReason

The candidate content was flagged for safety reasons.

const FinishReason('SAFETY')
recitation → const FinishReason

The candidate content was flagged for recitation reasons.

const FinishReason('RECITATION')
malformedFunctionCall → const FinishReason

The candidate content was flagged for malformed function call reasons.

const FinishReason('MALFORMED_FUNCTION_CALL')
other → const FinishReason

Unknown reason.

const FinishReason('OTHER')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
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
toJson() String
Convert to json format
toString() String
A string representation of this object.
override

Operators

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

Static Methods

parseValue(Object jsonObject) FinishReason
Parse the json to FinishReason object.

Constants

values → const List<FinishReason>
A constant List of the values in this enum, in order of their declaration.