Interface GenerateContentResponseOrBuilder (3.40.0)

public interface GenerateContentResponseOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getCandidates(int index)

public abstract Candidate getCandidates(int index)

Output only. Generated candidates.

repeated .google.cloud.aiplatform.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
Candidate

getCandidatesCount()

public abstract int getCandidatesCount()

Output only. Generated candidates.

repeated .google.cloud.aiplatform.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

getCandidatesList()

public abstract List<Candidate> getCandidatesList()

Output only. Generated candidates.

repeated .google.cloud.aiplatform.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<Candidate>

getCandidatesOrBuilder(int index)

public abstract CandidateOrBuilder getCandidatesOrBuilder(int index)

Output only. Generated candidates.

repeated .google.cloud.aiplatform.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
CandidateOrBuilder

getCandidatesOrBuilderList()

public abstract List<? extends CandidateOrBuilder> getCandidatesOrBuilderList()

Output only. Generated candidates.

repeated .google.cloud.aiplatform.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<? extends com.google.cloud.aiplatform.v1beta1.CandidateOrBuilder>

getPromptFeedback()

public abstract GenerateContentResponse.PromptFeedback getPromptFeedback()

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.aiplatform.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
GenerateContentResponse.PromptFeedback

The promptFeedback.

getPromptFeedbackOrBuilder()

public abstract GenerateContentResponse.PromptFeedbackOrBuilder getPromptFeedbackOrBuilder()

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.aiplatform.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
GenerateContentResponse.PromptFeedbackOrBuilder

getUsageMetadata()

public abstract GenerateContentResponse.UsageMetadata getUsageMetadata()

Usage metadata about the response(s).

.google.cloud.aiplatform.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;

Returns
TypeDescription
GenerateContentResponse.UsageMetadata

The usageMetadata.

getUsageMetadataOrBuilder()

public abstract GenerateContentResponse.UsageMetadataOrBuilder getUsageMetadataOrBuilder()

Usage metadata about the response(s).

.google.cloud.aiplatform.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;

Returns
TypeDescription
GenerateContentResponse.UsageMetadataOrBuilder

hasPromptFeedback()

public abstract boolean hasPromptFeedback()

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.aiplatform.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the promptFeedback field is set.

hasUsageMetadata()

public abstract boolean hasUsageMetadata()

Usage metadata about the response(s).

.google.cloud.aiplatform.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;

Returns
TypeDescription
boolean

Whether the usageMetadata field is set.