TypedCandidate

class TypedCandidate<T : Any?>


A piece of a response from the model. Contains the FinishReason in addition to the response object of the desired class type.

Summary

Nested types

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

The reason why this TypedCandidate is returned.

Public properties

Int?

the reason why this TypedCandidate is finished generating.

T?

the response object of the desired class type.

Public properties

finishReason

val finishReasonInt?

the reason why this TypedCandidate is finished generating.

response

val response: T?

the response object of the desired class type. This is null if the response cannot be parsed to the desired class.