publicfinalclass GenerateContentResponseextendsGeneratedMessageV3implementsGenerateContentResponseOrBuilder
Response message for [PredictionService.GenerateContent].
Protobuf type google.cloud.vertexai.v1.GenerateContentResponse
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
CANDIDATES_FIELD_NUMBER
publicstaticfinalintCANDIDATES_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
PROMPT_FEEDBACK_FIELD_NUMBER
publicstaticfinalintPROMPT_FEEDBACK_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
USAGE_METADATA_FIELD_NUMBER
publicstaticfinalintUSAGE_METADATA_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
Static Methods
getDefaultInstance()
publicstaticGenerateContentResponsegetDefaultInstance()
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()
newBuilder()
publicstaticGenerateContentResponse.BuildernewBuilder()
newBuilder(GenerateContentResponse prototype)
publicstaticGenerateContentResponse.BuildernewBuilder(GenerateContentResponseprototype)
parseDelimitedFrom(InputStream input)
publicstaticGenerateContentResponseparseDelimitedFrom(InputStreaminput)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentResponseparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
parseFrom(byte[] data)
publicstaticGenerateContentResponseparseFrom(byte[]data)
| Parameter |
| Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentResponseparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
parseFrom(ByteString data)
publicstaticGenerateContentResponseparseFrom(ByteStringdata)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentResponseparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
parseFrom(CodedInputStream input)
publicstaticGenerateContentResponseparseFrom(CodedInputStreaminput)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentResponseparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
parseFrom(InputStream input)
publicstaticGenerateContentResponseparseFrom(InputStreaminput)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentResponseparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
parseFrom(ByteBuffer data)
publicstaticGenerateContentResponseparseFrom(ByteBufferdata)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentResponseparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
parser()
publicstaticParser<GenerateContentResponse>parser()
Methods
equals(Object obj)
publicbooleanequals(Objectobj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
getCandidates(int index)
publicCandidategetCandidates(intindex)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter |
| Name |
Description |
index |
int
|
getCandidatesCount()
publicintgetCandidatesCount()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
int |
getCandidatesList()
publicList<Candidate>getCandidatesList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCandidatesOrBuilder(int index)
publicCandidateOrBuildergetCandidatesOrBuilder(intindex)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter |
| Name |
Description |
index |
int
|
getCandidatesOrBuilderList()
publicList<?extendsCandidateOrBuilder>getCandidatesOrBuilderList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
List<? extends com.google.cloud.vertexai.api.CandidateOrBuilder> |
getDefaultInstanceForType()
publicGenerateContentResponsegetDefaultInstanceForType()
getParserForType()
publicParser<GenerateContentResponse>getParserForType()
Overrides
getPromptFeedback()
publicGenerateContentResponse.PromptFeedbackgetPromptFeedback()
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPromptFeedbackOrBuilder()
publicGenerateContentResponse.PromptFeedbackOrBuildergetPromptFeedbackOrBuilder()
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSerializedSize()
publicintgetSerializedSize()
| Returns |
| Type |
Description |
int |
Overrides
getUsageMetadata()
publicGenerateContentResponse.UsageMetadatagetUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
getUsageMetadataOrBuilder()
publicGenerateContentResponse.UsageMetadataOrBuildergetUsageMetadataOrBuilder()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
hasPromptFeedback()
publicbooleanhasPromptFeedback()
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns |
| Type |
Description |
boolean |
Whether the promptFeedback field is set.
|
hasUsageMetadata()
publicbooleanhasUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
| Returns |
| Type |
Description |
boolean |
Whether the usageMetadata field is set.
|
hashCode()
| Returns |
| Type |
Description |
int |
Overrides
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Overrides
isInitialized()
publicfinalbooleanisInitialized()
Overrides
newBuilderForType()
publicGenerateContentResponse.BuildernewBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protectedGenerateContentResponse.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
| Returns |
| Type |
Description |
Object |
Overrides
toBuilder()
publicGenerateContentResponse.BuildertoBuilder()
writeTo(CodedOutputStream output)
publicvoidwriteTo(CodedOutputStreamoutput)
Overrides