public final class Candidate extends com.google.protobuf.GeneratedMessageV3 implements CandidateOrBuilder
A response candidate generated from the model.Protobuf type
google.cloud.vertexai.v1.Candidate| Modifier and Type | Class and Description |
|---|---|
static class |
Candidate.Builder
A response candidate generated from the model.
|
static class |
Candidate.FinishReason
The reason why the model stopped generating tokens.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
AVG_LOGPROBS_FIELD_NUMBER |
static int |
CITATION_METADATA_FIELD_NUMBER |
static int |
CONTENT_FIELD_NUMBER |
static int |
FINISH_MESSAGE_FIELD_NUMBER |
static int |
FINISH_REASON_FIELD_NUMBER |
static int |
GROUNDING_METADATA_FIELD_NUMBER |
static int |
INDEX_FIELD_NUMBER |
static int |
LOGPROBS_RESULT_FIELD_NUMBER |
static int |
SAFETY_RATINGS_FIELD_NUMBER |
static int |
SCORE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getAvgLogprobs()
Output only.
|
CitationMetadata |
getCitationMetadata()
Output only.
|
CitationMetadataOrBuilder |
getCitationMetadataOrBuilder()
Output only.
|
Content |
getContent()
Output only.
|
ContentOrBuilder |
getContentOrBuilder()
Output only.
|
static Candidate |
getDefaultInstance() |
Candidate |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getFinishMessage()
Output only.
|
com.google.protobuf.ByteString |
getFinishMessageBytes()
Output only.
|
Candidate.FinishReason |
getFinishReason()
Output only.
|
int |
getFinishReasonValue()
Output only.
|
GroundingMetadata |
getGroundingMetadata()
Output only.
|
GroundingMetadataOrBuilder |
getGroundingMetadataOrBuilder()
Output only.
|
int |
getIndex()
Output only.
|
LogprobsResult |
getLogprobsResult()
Output only.
|
LogprobsResultOrBuilder |
getLogprobsResultOrBuilder()
Output only.
|
com.google.protobuf.Parser<Candidate> |
getParserForType() |
SafetyRating |
getSafetyRatings(int index)
Output only.
|
int |
getSafetyRatingsCount()
Output only.
|
List<SafetyRating> |
getSafetyRatingsList()
Output only.
|
SafetyRatingOrBuilder |
getSafetyRatingsOrBuilder(int index)
Output only.
|
List<? extends SafetyRatingOrBuilder> |
getSafetyRatingsOrBuilderList()
Output only.
|
double |
getScore()
Output only.
|
int |
getSerializedSize() |
boolean |
hasCitationMetadata()
Output only.
|
boolean |
hasContent()
Output only.
|
boolean |
hasFinishMessage()
Output only.
|
boolean |
hasGroundingMetadata()
Output only.
|
int |
hashCode() |
boolean |
hasLogprobsResult()
Output only.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Candidate.Builder |
newBuilder() |
static Candidate.Builder |
newBuilder(Candidate prototype) |
Candidate.Builder |
newBuilderForType() |
protected Candidate.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Candidate |
parseDelimitedFrom(InputStream input) |
static Candidate |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Candidate |
parseFrom(byte[] data) |
static Candidate |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Candidate |
parseFrom(ByteBuffer data) |
static Candidate |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Candidate |
parseFrom(com.google.protobuf.ByteString data) |
static Candidate |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Candidate |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Candidate |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Candidate |
parseFrom(InputStream input) |
static Candidate |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Candidate> |
parser() |
Candidate.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int INDEX_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER
public static final int SCORE_FIELD_NUMBER
public static final int AVG_LOGPROBS_FIELD_NUMBER
public static final int LOGPROBS_RESULT_FIELD_NUMBER
public static final int FINISH_REASON_FIELD_NUMBER
public static final int SAFETY_RATINGS_FIELD_NUMBER
public static final int FINISH_MESSAGE_FIELD_NUMBER
public static final int CITATION_METADATA_FIELD_NUMBER
public static final int GROUNDING_METADATA_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public int getIndex()
Output only. Index of the candidate.
int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];getIndex in interface CandidateOrBuilderpublic boolean hasContent()
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasContent in interface CandidateOrBuilderpublic Content getContent()
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getContent in interface CandidateOrBuilderpublic ContentOrBuilder getContentOrBuilder()
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getContentOrBuilder in interface CandidateOrBuilderpublic double getScore()
Output only. Confidence score of the candidate.
double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];getScore in interface CandidateOrBuilderpublic double getAvgLogprobs()
Output only. Average log probability score of the candidate.
double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];getAvgLogprobs in interface CandidateOrBuilderpublic boolean hasLogprobsResult()
Output only. Log-likelihood scores for the response tokens and top tokens
.google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasLogprobsResult in interface CandidateOrBuilderpublic LogprobsResult getLogprobsResult()
Output only. Log-likelihood scores for the response tokens and top tokens
.google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
getLogprobsResult in interface CandidateOrBuilderpublic LogprobsResultOrBuilder getLogprobsResultOrBuilder()
Output only. Log-likelihood scores for the response tokens and top tokens
.google.cloud.vertexai.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
getLogprobsResultOrBuilder in interface CandidateOrBuilderpublic int getFinishReasonValue()
Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
.google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getFinishReasonValue in interface CandidateOrBuilderpublic Candidate.FinishReason getFinishReason()
Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
.google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getFinishReason in interface CandidateOrBuilderpublic List<SafetyRating> getSafetyRatingsList()
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsList in interface CandidateOrBuilderpublic List<? extends SafetyRatingOrBuilder> getSafetyRatingsOrBuilderList()
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsOrBuilderList in interface CandidateOrBuilderpublic int getSafetyRatingsCount()
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsCount in interface CandidateOrBuilderpublic SafetyRating getSafetyRatings(int index)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatings in interface CandidateOrBuilderpublic SafetyRatingOrBuilder getSafetyRatingsOrBuilder(int index)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsOrBuilder in interface CandidateOrBuilderpublic boolean hasFinishMessage()
Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set.
optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];hasFinishMessage in interface CandidateOrBuilderpublic String getFinishMessage()
Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set.
optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];getFinishMessage in interface CandidateOrBuilderpublic com.google.protobuf.ByteString getFinishMessageBytes()
Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set.
optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];getFinishMessageBytes in interface CandidateOrBuilderpublic boolean hasCitationMetadata()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasCitationMetadata in interface CandidateOrBuilderpublic CitationMetadata getCitationMetadata()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCitationMetadata in interface CandidateOrBuilderpublic CitationMetadataOrBuilder getCitationMetadataOrBuilder()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCitationMetadataOrBuilder in interface CandidateOrBuilderpublic boolean hasGroundingMetadata()
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasGroundingMetadata in interface CandidateOrBuilderpublic GroundingMetadata getGroundingMetadata()
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getGroundingMetadata in interface CandidateOrBuilderpublic GroundingMetadataOrBuilder getGroundingMetadataOrBuilder()
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getGroundingMetadataOrBuilder in interface CandidateOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Candidate parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Candidate parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Candidate parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Candidate parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Candidate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Candidate parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Candidate parseFrom(InputStream input) throws IOException
IOExceptionpublic static Candidate parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Candidate parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Candidate parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Candidate parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Candidate parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Candidate.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Candidate.Builder newBuilder()
public static Candidate.Builder newBuilder(Candidate prototype)
public Candidate.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Candidate.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Candidate getDefaultInstance()
public static com.google.protobuf.Parser<Candidate> parser()
public com.google.protobuf.Parser<Candidate> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Candidate getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.