# Candidate.FinishReason

# Candidate.FinishReason


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

<br />

*** ** * ** ***

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

## Summary

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

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

## Constants

### MAX_TOKENS

```
public static final int MAX_TOKENS
```

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

### OTHER

```
public static final int OTHER
```

All other reasons that stopped the generation.

### STOP

```
public static final int STOP
```

Natural stop point of the model.

## Public constructors

### FinishReason

```
public FinishReason()
```