Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class SafetySettings.
Settings for Generative Safety.
Generated from protobuf message google.cloud.dialogflow.cx.v3.SafetySettings
Namespace
Google \ Cloud \ Dialogflow \ Cx \ V3Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ default_banned_phrase_match_strategy |
int
Optional. Default phrase match strategy for banned phrases. |
↳ banned_phrases |
array<SafetySettings\Phrase>
Banned phrases for generated text. |
↳ rai_settings |
SafetySettings\RaiSettings
Optional. Settings for Responsible AI checks. |
↳ default_rai_settings |
SafetySettings\RaiSettings
Optional. Immutable. Default RAI settings to be annotated on the agent, so that users will be able to restore their RAI configurations to the default settings. Read-only field for the API proto only. |
↳ prompt_security_settings |
SafetySettings\PromptSecuritySettings
Optional. Settings for prompt security checks. |
getDefaultBannedPhraseMatchStrategy
Optional. Default phrase match strategy for banned phrases.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type PhraseMatchStrategy. |
setDefaultBannedPhraseMatchStrategy
Optional. Default phrase match strategy for banned phrases.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type PhraseMatchStrategy. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getBannedPhrases
Banned phrases for generated text.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setBannedPhrases
Banned phrases for generated text.
| Parameter | |
|---|---|
| Name | Description |
var |
array<SafetySettings\Phrase>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRaiSettings
Optional. Settings for Responsible AI checks.
| Returns | |
|---|---|
| Type | Description |
SafetySettings\RaiSettings|null |
|
hasRaiSettings
clearRaiSettings
setRaiSettings
Optional. Settings for Responsible AI checks.
| Parameter | |
|---|---|
| Name | Description |
var |
SafetySettings\RaiSettings
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDefaultRaiSettings
Optional. Immutable. Default RAI settings to be annotated on the agent, so that users will be able to restore their RAI configurations to the default settings. Read-only field for the API proto only.
| Returns | |
|---|---|
| Type | Description |
SafetySettings\RaiSettings|null |
|
hasDefaultRaiSettings
clearDefaultRaiSettings
setDefaultRaiSettings
Optional. Immutable. Default RAI settings to be annotated on the agent, so that users will be able to restore their RAI configurations to the default settings. Read-only field for the API proto only.
| Parameter | |
|---|---|
| Name | Description |
var |
SafetySettings\RaiSettings
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getPromptSecuritySettings
Optional. Settings for prompt security checks.
| Returns | |
|---|---|
| Type | Description |
SafetySettings\PromptSecuritySettings|null |
|
hasPromptSecuritySettings
clearPromptSecuritySettings
setPromptSecuritySettings
Optional. Settings for prompt security checks.
| Parameter | |
|---|---|
| Name | Description |
var |
SafetySettings\PromptSecuritySettings
|
| Returns | |
|---|---|
| Type | Description |
$this |
|