Class GenerateContentResponse.Builder
- Enclosing class:
- GenerateContentResponse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautomaticFunctionCallingHistory
(Content... automaticFunctionCallingHistory) Setter for automaticFunctionCallingHistory.automaticFunctionCallingHistory
(Content.Builder... automaticFunctionCallingHistoryBuilders) Setter for automaticFunctionCallingHistory builder.abstract GenerateContentResponse.Builder
automaticFunctionCallingHistory
(List<Content> automaticFunctionCallingHistory) Setter for automaticFunctionCallingHistory.abstract GenerateContentResponse
build()
candidates
(Candidate... candidates) Setter for candidates.candidates
(Candidate.Builder... candidatesBuilders) Setter for candidates builder.abstract GenerateContentResponse.Builder
candidates
(List<Candidate> candidates) Setter for candidates.abstract GenerateContentResponse.Builder
createTime
(Instant createTime) Setter for createTime.abstract GenerateContentResponse.Builder
modelVersion
(String modelVersion) Setter for modelVersion.abstract GenerateContentResponse.Builder
promptFeedback
(GenerateContentResponsePromptFeedback promptFeedback) Setter for promptFeedback.promptFeedback
(GenerateContentResponsePromptFeedback.Builder promptFeedbackBuilder) Setter for promptFeedback builder.abstract GenerateContentResponse.Builder
responseId
(String responseId) Setter for responseId.abstract GenerateContentResponse.Builder
usageMetadata
(GenerateContentResponseUsageMetadata usageMetadata) Setter for usageMetadata.usageMetadata
(GenerateContentResponseUsageMetadata.Builder usageMetadataBuilder) Setter for usageMetadata builder.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
candidates
Setter for candidates.candidates: Response variations returned by the model.
-
candidates
Setter for candidates.candidates: Response variations returned by the model.
-
candidates
Setter for candidates builder.candidates: Response variations returned by the model.
-
createTime
Setter for createTime.createTime: Timestamp when the request is made to the server.
-
responseId
Setter for responseId.responseId: Identifier for each response.
-
automaticFunctionCallingHistory
public abstract GenerateContentResponse.Builder automaticFunctionCallingHistory(List<Content> automaticFunctionCallingHistory) Setter for automaticFunctionCallingHistory.automaticFunctionCallingHistory: The history of automatic function calling.
-
automaticFunctionCallingHistory
public GenerateContentResponse.Builder automaticFunctionCallingHistory(Content... automaticFunctionCallingHistory) Setter for automaticFunctionCallingHistory.automaticFunctionCallingHistory: The history of automatic function calling.
-
automaticFunctionCallingHistory
public GenerateContentResponse.Builder automaticFunctionCallingHistory(Content.Builder... automaticFunctionCallingHistoryBuilders) Setter for automaticFunctionCallingHistory builder.automaticFunctionCallingHistory: The history of automatic function calling.
-
modelVersion
Setter for modelVersion.modelVersion: Output only. The model version used to generate the response.
-
promptFeedback
public abstract GenerateContentResponse.Builder promptFeedback(GenerateContentResponsePromptFeedback promptFeedback) Setter for promptFeedback.promptFeedback: 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.
-
promptFeedback
public GenerateContentResponse.Builder promptFeedback(GenerateContentResponsePromptFeedback.Builder promptFeedbackBuilder) Setter for promptFeedback builder.promptFeedback: 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.
-
usageMetadata
public abstract GenerateContentResponse.Builder usageMetadata(GenerateContentResponseUsageMetadata usageMetadata) Setter for usageMetadata.usageMetadata: Usage metadata about the response(s).
-
usageMetadata
public GenerateContentResponse.Builder usageMetadata(GenerateContentResponseUsageMetadata.Builder usageMetadataBuilder) Setter for usageMetadata builder.usageMetadata: Usage metadata about the response(s).
-
build
-