Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class SafetyRating.
Safety rating corresponding to the generated content.
Generated from protobuf message google.cloud.aiplatform.v1.SafetyRating
Namespace
Google \ Cloud \ AIPlatform \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ category |
int
Output only. Harm category. |
↳ probability |
int
Output only. Harm probability levels in the content. |
↳ blocked |
bool
Output only. Indicates whether the content was filtered out because of this rating. |
getCategory
Output only. Harm category.
| Returns | |
|---|---|
| Type | Description |
int |
|
setCategory
Output only. Harm category.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getProbability
Output only. Harm probability levels in the content.
| Returns | |
|---|---|
| Type | Description |
int |
|
setProbability
Output only. Harm probability levels in the content.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getBlocked
Output only. Indicates whether the content was filtered out because of this rating.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setBlocked
Output only. Indicates whether the content was filtered out because of this rating.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|