Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class GenerateContentResponse.
Response message for [PredictionService.GenerateContent].
Generated from protobuf message google.cloud.aiplatform.v1.GenerateContentResponse
Namespace
Google \ Cloud \ AIPlatform \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ candidates
↳ model_version
string
Output only. The model version used to generate the response.
↳ create_time
↳ response_id
string
Output only. response_id is used to identify each response. It is the encoding of the event_id.
↳ prompt_feedback
GenerateContentResponse\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.
↳ usage_metadata
getCandidates
Output only. Generated candidates.
setCandidates
Output only. Generated candidates.
$this
getModelVersion
Output only. The model version used to generate the response.
string
setModelVersion
Output only. The model version used to generate the response.
var
string
$this
getCreateTime
Output only. Timestamp when the request is made to the server.
hasCreateTime
clearCreateTime
setCreateTime
Output only. Timestamp when the request is made to the server.
$this
getResponseId
Output only. response_id is used to identify each response. It is the encoding of the event_id.
string
setResponseId
Output only. response_id is used to identify each response. It is the encoding of the event_id.
var
string
$this
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.
hasPromptFeedback
clearPromptFeedback
setPromptFeedback
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.
$this
getUsageMetadata
Usage metadata about the response(s).
hasUsageMetadata
clearUsageMetadata
setUsageMetadata
Usage metadata about the response(s).
$this

