Google Cloud Ai Platform V1 Client - Class PromptFeedback (1.39.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class PromptFeedback.

Content filter results for a prompt sent in the request.

Generated from protobuf message google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback

Namespace

Google \ Cloud \ AIPlatform \ V1 \ GenerateContentResponse

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ block_reason int

Output only. Blocked reason.

↳ safety_ratings array<Google\Cloud\AIPlatform\V1\SafetyRating>

Output only. Safety ratings.

↳ block_reason_message string

Output only. A readable block reason message.

getBlockReason

Output only. Blocked reason.

Returns
Type Description
int Enum of type BlockedReason.

setBlockReason

Output only. Blocked reason.

Parameter
Name Description
var int

Enum of type BlockedReason.

Returns
Type Description
$this

getSafetyRatings

Output only. Safety ratings.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setSafetyRatings

Output only. Safety ratings.

Parameter
Name Description
var array<Google\Cloud\AIPlatform\V1\SafetyRating>
Returns
Type Description
$this

getBlockReasonMessage

Output only. A readable block reason message.

Returns
Type Description
string

setBlockReasonMessage

Output only. A readable block reason message.

Parameter
Name Description
var string
Returns
Type Description
$this