FinishReason

class FinishReason


Represents the reason why the model stopped generating content.

Summary

Public companion properties

FinishReason

Model hit the token limit.

FinishReason

Model stopped for another reason.

FinishReason

The token generation was stopped because the response was flagged for unauthorized citations.

FinishReason

SafetySetting prevented the model from outputting content.

FinishReason

Model finished successfully and stopped.

FinishReason

A new and not yet supported value.

Public properties

String

The name of the finish reason.

Int

The ordinal value of the finish reason.

Public companion properties

MAX_TOKENS

val MAX_TOKENSFinishReason

Model hit the token limit.

OTHER

val OTHERFinishReason

Model stopped for another reason.

RECITATION

val RECITATIONFinishReason

The token generation was stopped because the response was flagged for unauthorized citations.

SAFETY

val SAFETYFinishReason

SafetySetting prevented the model from outputting content.

STOP

val STOPFinishReason

Model finished successfully and stopped.

UNKNOWN

val UNKNOWNFinishReason

A new and not yet supported value.

Public properties

name

val nameString

The name of the finish reason.

ordinal

val ordinalInt

The ordinal value of the finish reason.