Candidate
public final class Candidate
A piece of a response from the model. Contains the FinishReason in addition to the response text String of the response.
Summary
Nested types |
|---|
@IntDef(value = [0, 1, -100])The reason why this |
Public methods |
|
|---|---|
final Integer |
the reason why this |
final @NonNull String |
getText()the text string of the |
Public methods
getFinishReason
public final Integer getFinishReason()
the reason why this Candidate is finished generating. This will be null for intermediate responses during streaming, and non-null for the final response in streaming or non-streaming mode.