public final class Candidate extends GeneratedMessageV3 implements CandidateOrBuilder
A response candidate generated from the model.
Protobuf type google.cloud.aiplatform.v1.Candidate
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int CITATION_METADATA_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
CONTENT_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int FINISH_MESSAGE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int FINISH_REASON_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int GROUNDING_METADATA_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int INDEX_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int SAFETY_RATINGS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int SCORE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
public static Candidate getDefaultInstance()
public static final Descriptors.Descriptor getDescriptor()
public static Candidate.Builder newBuilder()
public static Candidate.Builder newBuilder(Candidate prototype)
Parameter |
Name |
Description |
prototype |
Candidate
|
public static Candidate parseDelimitedFrom(InputStream input)
public static Candidate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Candidate parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
public static Candidate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Candidate parseFrom(ByteString data)
public static Candidate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Candidate parseFrom(CodedInputStream input)
public static Candidate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Candidate parseFrom(InputStream input)
public static Candidate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Candidate parseFrom(ByteBuffer data)
public static Candidate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Parser<Candidate> parser()
Methods
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
public CitationMetadata getCitationMetadata()
Output only. Source attribution of the generated content.
.google.cloud.aiplatform.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public CitationMetadataOrBuilder getCitationMetadataOrBuilder()
Output only. Source attribution of the generated content.
.google.cloud.aiplatform.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getContent()
public Content getContent()
Output only. Content parts of the candidate.
.google.cloud.aiplatform.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
Content |
The content.
|
getContentOrBuilder()
public ContentOrBuilder getContentOrBuilder()
Output only. Content parts of the candidate.
.google.cloud.aiplatform.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate getDefaultInstanceForType()
public 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];
Returns |
Type |
Description |
String |
The finishMessage.
|
public 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];
Returns |
Type |
Description |
ByteString |
The bytes for finishMessage.
|
public 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.aiplatform.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
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];
Returns |
Type |
Description |
int |
The enum numeric value on the wire for finishReason.
|
public GroundingMetadata 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];
public GroundingMetadataOrBuilder 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];
Output only. Index of the candidate.
int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
int |
The index.
|
public Parser<Candidate> getParserForType()
Overrides
public 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.aiplatform.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
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];
Returns |
Type |
Description |
int |
|
public 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.aiplatform.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public 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.aiplatform.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
public 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.aiplatform.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
List<? extends com.google.cloud.aiplatform.v1.SafetyRatingOrBuilder> |
|
Output only. Confidence score of the candidate.
double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
double |
The score.
|
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
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];
Returns |
Type |
Description |
boolean |
Whether the citationMetadata field is set.
|
hasContent()
public boolean hasContent()
Output only. Content parts of the candidate.
.google.cloud.aiplatform.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
Whether the content field is set.
|
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];
Returns |
Type |
Description |
boolean |
Whether the finishMessage field is set.
|
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];
Returns |
Type |
Description |
boolean |
Whether the groundingMetadata field is set.
|
Returns |
Type |
Description |
int |
|
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public Candidate.Builder newBuilderForType()
protected Candidate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
public Candidate.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides