Candidate


public final class Candidate


A piece of a response from the model. Contains the FinishReason in addition to the Content of the response.

Summary

Nested types

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

Finish reason associated with a Candidate

Public constructors

@VisibleForTesting(otherwise = 3)
Candidate(
    @NonNull Content content,
    @Candidate.FinishReason Integer finishReason
)

Public methods

final @NonNull Content
final Integer

Public constructors

Candidate

@VisibleForTesting(otherwise = 3)
public Candidate(
    @NonNull Content content,
    @Candidate.FinishReason Integer finishReason
)

Public methods

getContent

public final @NonNull Content getContent()

getFinishReason

public final Integer getFinishReason()