Google Cloud Ai Platform V1 Client - Class PromptFeedback (0.31.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
NameDescription
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
TypeDescription
int

setBlockReason

Output only. Blocked reason.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getSafetyRatings

Output only. Safety ratings.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setSafetyRatings

Output only. Safety ratings.

Parameter
NameDescription
var array<Google\Cloud\AIPlatform\V1\SafetyRating>
Returns
TypeDescription
$this

getBlockReasonMessage

Output only. A readable block reason message.

Returns
TypeDescription
string

setBlockReasonMessage

Output only. A readable block reason message.

Parameter
NameDescription
var string
Returns
TypeDescription
$this