Interface GenerateContentResponseOrBuilder (3.46.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.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Candidate

getCandidatesCount()

public abstract int getCandidatesCount()

Output only. Generated candidates.

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

Returns
Type Description
int

getCandidatesList()

public abstract List<Candidate> getCandidatesList()

Output only. Generated candidates.

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

Returns
Type Description
List<Candidate>

getCandidatesOrBuilder(int index)

public abstract CandidateOrBuilder getCandidatesOrBuilder(int index)

Output only. Generated candidates.

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

Parameter
Name Description
index int
Returns
Type Description
CandidateOrBuilder

getCandidatesOrBuilderList()

public abstract List<? extends CandidateOrBuilder> getCandidatesOrBuilderList()

Output only. Generated candidates.

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

Returns
Type Description
List<? extends com.google.cloud.aiplatform.v1.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.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
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.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GenerateContentResponse.PromptFeedbackOrBuilder

getUsageMetadata()

public abstract GenerateContentResponse.UsageMetadata getUsageMetadata()

Usage metadata about the response(s).

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

Returns
Type Description
GenerateContentResponse.UsageMetadata

The usageMetadata.

getUsageMetadataOrBuilder()

public abstract GenerateContentResponse.UsageMetadataOrBuilder getUsageMetadataOrBuilder()

Usage metadata about the response(s).

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

Returns
Type Description
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.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the promptFeedback field is set.

hasUsageMetadata()

public abstract boolean hasUsageMetadata()

Usage metadata about the response(s).

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

Returns
Type Description
boolean

Whether the usageMetadata field is set.