# Candidate.FinishReason

# Candidate.FinishReason


```
@IntDef(value = [0, 1, -100])
annotation Candidate.FinishReason
```

<br />

*** ** * ** ***

The reason why this `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/Candidate` is returned.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/Candidate.FinishReason#MAX_TOKENS()` The maximum number of output tokens as specified in the request was reached. |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/Candidate.FinishReason#OTHER()` All other reasons that stopped the generation. |
| `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/Candidate.FinishReason#STOP()` Natural stop point of the model. |

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/Candidate.FinishReason#FinishReason()()` |

## Constants

### MAX_TOKENS

```
const val MAX_TOKENS: Int
```

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

### OTHER

```
const val OTHER: Int
```

All other reasons that stopped the generation.

### STOP

```
const val STOP: Int
```

Natural stop point of the model.

## Public constructors

### FinishReason

```
FinishReason()
```