# TypedCandidate.TypedFinishReason


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

<br />

*** ** * ** ***

The reason why this `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/TypedCandidate` is returned. Note: values from this class is populated from `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Candidate.FinishReason`. Any updates to the `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/Candidate.FinishReason` should be reflected in this class as well.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/TypedCandidate.TypedFinishReason#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/TypedCandidate.TypedFinishReason#OTHER()` All other reasons that stopped the generation. |
| `static final int` | `https://developers.google.com/android/reference/com/google/mlkit/genai/prompt/TypedCandidate.TypedFinishReason#STOP()` Natural stop point of the model. |

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

## 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

### TypedFinishReason

```
public TypedFinishReason()
```