Package com.google.cloud.aiplatform.v1
Class Candidate
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.aiplatform.v1.Candidate
- All Implemented Interfaces:
CandidateOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class Candidate
extends com.google.protobuf.GeneratedMessage
implements CandidateOrBuilder
A response candidate generated from the model.Protobuf type
google.cloud.aiplatform.v1.Candidate- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA response candidate generated from the model.static enumThe reason why the model stopped generating tokens.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleandoubleOutput only.Output only.Output only.Output only.Output only.static Candidatestatic final com.google.protobuf.Descriptors.DescriptorOutput only.com.google.protobuf.ByteStringOutput only.Output only.intOutput only.Output only.Output only.intgetIndex()Output only.Output only.Output only.com.google.protobuf.Parser<Candidate>getSafetyRatings(int index) Output only.intOutput only.Output only.getSafetyRatingsOrBuilder(int index) Output only.List<? extends SafetyRatingOrBuilder>Output only.doublegetScore()Output only.intOutput only.Output only.booleanOutput only.booleanOutput only.booleanOutput only.booleanOutput only.inthashCode()booleanOutput only.booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Candidate.Builderstatic Candidate.BuildernewBuilder(Candidate prototype) protected Candidate.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static CandidateparseDelimitedFrom(InputStream input) static CandidateparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CandidateparseFrom(byte[] data) static CandidateparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CandidateparseFrom(com.google.protobuf.ByteString data) static CandidateparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CandidateparseFrom(com.google.protobuf.CodedInputStream input) static CandidateparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CandidateparseFrom(InputStream input) static CandidateparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CandidateparseFrom(ByteBuffer data) static CandidateparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Candidate>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
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, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
INDEX_FIELD_NUMBER
public static final int INDEX_FIELD_NUMBER- See Also:
-
CONTENT_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER- See Also:
-
SCORE_FIELD_NUMBER
public static final int SCORE_FIELD_NUMBER- See Also:
-
AVG_LOGPROBS_FIELD_NUMBER
public static final int AVG_LOGPROBS_FIELD_NUMBER- See Also:
-
LOGPROBS_RESULT_FIELD_NUMBER
public static final int LOGPROBS_RESULT_FIELD_NUMBER- See Also:
-
FINISH_REASON_FIELD_NUMBER
public static final int FINISH_REASON_FIELD_NUMBER- See Also:
-
SAFETY_RATINGS_FIELD_NUMBER
public static final int SAFETY_RATINGS_FIELD_NUMBER- See Also:
-
FINISH_MESSAGE_FIELD_NUMBER
public static final int FINISH_MESSAGE_FIELD_NUMBER- See Also:
-
CITATION_METADATA_FIELD_NUMBER
public static final int CITATION_METADATA_FIELD_NUMBER- See Also:
-
GROUNDING_METADATA_FIELD_NUMBER
public static final int GROUNDING_METADATA_FIELD_NUMBER- See Also:
-
URL_CONTEXT_METADATA_FIELD_NUMBER
public static final int URL_CONTEXT_METADATA_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getIndex
public int getIndex()Output only. Index of the candidate.
int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getIndexin interfaceCandidateOrBuilder- Returns:
- The index.
-
hasContent
public boolean hasContent()Output only. Content parts of the candidate.
.google.cloud.aiplatform.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasContentin interfaceCandidateOrBuilder- Returns:
- Whether the content field is set.
-
getContent
Output only. Content parts of the candidate.
.google.cloud.aiplatform.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getContentin interfaceCandidateOrBuilder- Returns:
- The content.
-
getContentOrBuilder
Output only. Content parts of the candidate.
.google.cloud.aiplatform.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getContentOrBuilderin interfaceCandidateOrBuilder
-
getScore
public double getScore()Output only. Confidence score of the candidate.
double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getScorein interfaceCandidateOrBuilder- Returns:
- The score.
-
getAvgLogprobs
public double getAvgLogprobs()Output only. Average log probability score of the candidate.
double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getAvgLogprobsin interfaceCandidateOrBuilder- Returns:
- The avgLogprobs.
-
hasLogprobsResult
public boolean hasLogprobsResult()Output only. Log-likelihood scores for the response tokens and top tokens
.google.cloud.aiplatform.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasLogprobsResultin interfaceCandidateOrBuilder- Returns:
- Whether the logprobsResult field is set.
-
getLogprobsResult
Output only. Log-likelihood scores for the response tokens and top tokens
.google.cloud.aiplatform.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getLogprobsResultin interfaceCandidateOrBuilder- Returns:
- The logprobsResult.
-
getLogprobsResultOrBuilder
Output only. Log-likelihood scores for the response tokens and top tokens
.google.cloud.aiplatform.v1.LogprobsResult logprobs_result = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getLogprobsResultOrBuilderin interfaceCandidateOrBuilder
-
getFinishReasonValue
public int getFinishReasonValue()Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
.google.cloud.aiplatform.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getFinishReasonValuein interfaceCandidateOrBuilder- Returns:
- The enum numeric value on the wire for finishReason.
-
getFinishReason
Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
.google.cloud.aiplatform.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getFinishReasonin interfaceCandidateOrBuilder- Returns:
- The finishReason.
-
getSafetyRatingsList
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSafetyRatingsListin interfaceCandidateOrBuilder
-
getSafetyRatingsOrBuilderList
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSafetyRatingsOrBuilderListin interfaceCandidateOrBuilder
-
getSafetyRatingsCount
public 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.aiplatform.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSafetyRatingsCountin interfaceCandidateOrBuilder
-
getSafetyRatings
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSafetyRatingsin interfaceCandidateOrBuilder
-
getSafetyRatingsOrBuilder
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSafetyRatingsOrBuilderin interfaceCandidateOrBuilder
-
hasFinishMessage
public 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];- Specified by:
hasFinishMessagein interfaceCandidateOrBuilder- Returns:
- Whether the finishMessage field is set.
-
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];- Specified by:
getFinishMessagein interfaceCandidateOrBuilder- Returns:
- The finishMessage.
-
getFinishMessageBytes
public 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];- Specified by:
getFinishMessageBytesin interfaceCandidateOrBuilder- Returns:
- The bytes for finishMessage.
-
hasCitationMetadata
public boolean hasCitationMetadata()Output only. Source attribution of the generated content.
.google.cloud.aiplatform.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasCitationMetadatain interfaceCandidateOrBuilder- Returns:
- Whether the citationMetadata field is set.
-
getCitationMetadata
Output only. Source attribution of the generated content.
.google.cloud.aiplatform.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCitationMetadatain interfaceCandidateOrBuilder- Returns:
- The citationMetadata.
-
getCitationMetadataOrBuilder
Output only. Source attribution of the generated content.
.google.cloud.aiplatform.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getCitationMetadataOrBuilderin interfaceCandidateOrBuilder
-
hasGroundingMetadata
public boolean hasGroundingMetadata()Output only. Metadata specifies sources used to ground generated content.
.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasGroundingMetadatain interfaceCandidateOrBuilder- Returns:
- Whether the groundingMetadata field is set.
-
getGroundingMetadata
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getGroundingMetadatain interfaceCandidateOrBuilder- Returns:
- The groundingMetadata.
-
getGroundingMetadataOrBuilder
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.aiplatform.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getGroundingMetadataOrBuilderin interfaceCandidateOrBuilder
-
hasUrlContextMetadata
public boolean hasUrlContextMetadata()Output only. Metadata related to url context retrieval tool.
.google.cloud.aiplatform.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasUrlContextMetadatain interfaceCandidateOrBuilder- Returns:
- Whether the urlContextMetadata field is set.
-
getUrlContextMetadata
Output only. Metadata related to url context retrieval tool.
.google.cloud.aiplatform.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getUrlContextMetadatain interfaceCandidateOrBuilder- Returns:
- The urlContextMetadata.
-
getUrlContextMetadataOrBuilder
Output only. Metadata related to url context retrieval tool.
.google.cloud.aiplatform.v1.UrlContextMetadata url_context_metadata = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getUrlContextMetadataOrBuilderin interfaceCandidateOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Candidate parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Candidate parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Candidate parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Candidate parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Candidate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Candidate parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Candidate parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Candidate parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Candidate parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Candidate.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-