public final class Candidate extends GeneratedMessageV3 implements CandidateOrBuilder
A response candidate generated from the model.
Protobuf type google.cloud.vertexai.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 |
|
FINISH_MESSAGE_FIELD_NUMBER
public static final int FINISH_MESSAGE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
FINISH_REASON_FIELD_NUMBER
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 |
|
INDEX_FIELD_NUMBER
public static final int INDEX_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SAFETY_RATINGS_FIELD_NUMBER
public static final int SAFETY_RATINGS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Candidate getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Candidate.Builder newBuilder()
newBuilder(Candidate prototype)
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)
parseFrom(byte[] data)
public static Candidate parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Candidate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Candidate parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
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)
parseFrom(ByteBuffer data)
public static Candidate parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Candidate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Candidate> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
public CitationMetadata getCitationMetadata()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public CitationMetadataOrBuilder getCitationMetadataOrBuilder()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getContent()
public Content getContent()
Output only. Content parts of the candidate.
.google.cloud.vertexai.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.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getDefaultInstanceForType()
public Candidate getDefaultInstanceForType()
getFinishMessage()
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.
|
getFinishMessageBytes()
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.
|
getFinishReason()
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.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
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.vertexai.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.vertexai.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.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getIndex()
Output only. Index of the candidate.
int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
int |
The index.
|
getParserForType()
public Parser<Candidate> getParserForType()
Overrides
getSafetyRatings(int index)
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.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
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.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
int |
|
getSafetyRatingsList()
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.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsOrBuilder(int index)
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.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
getSafetyRatingsOrBuilderList()
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.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
List<? extends com.google.cloud.vertexai.api.SafetyRatingOrBuilder> |
|
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
public boolean hasCitationMetadata()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.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.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
Whether the content field is set.
|
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];
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.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
Whether the groundingMetadata field is set.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Candidate.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Candidate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public Candidate.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides