Reference documentation and code samples for the Google Cloud Ces V1 Client class SafetySetting.
Safety setting.
Generated from protobuf message google.cloud.ces.v1.Guardrail.ModelSafety.SafetySetting
Namespace
Google \ Cloud \ Ces \ V1 \ Guardrail \ ModelSafetyMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ category |
int
Required. The harm category. |
↳ threshold |
int
Required. The harm block threshold. |
getCategory
Required. The harm category.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmCategory. |
setCategory
Required. The harm category.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmCategory. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getThreshold
Required. The harm block threshold.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type HarmBlockThreshold. |
setThreshold
Required. The harm block threshold.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type HarmBlockThreshold. |
| Returns | |
|---|---|
| Type | Description |
$this |
|