Google Cloud Ces V1 Client - Class ContentFilter (0.1.0)

Reference documentation and code samples for the Google Cloud Ces V1 Client class ContentFilter.

Guardrail that bans certain content from being used in the conversation.

Generated from protobuf message google.cloud.ces.v1.Guardrail.ContentFilter

Namespace

Google \ Cloud \ Ces \ V1 \ Guardrail

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ banned_contents array

Optional. List of banned phrases. Applies to both user inputs and agent responses.

↳ banned_contents_in_user_input array

Optional. List of banned phrases. Applies only to user inputs.

↳ banned_contents_in_agent_response array

Optional. List of banned phrases. Applies only to agent responses.

↳ match_type int

Required. Match type for the content filter.

↳ disregard_diacritics bool

Optional. If true, diacritics are ignored during matching.

getBannedContents

Optional. List of banned phrases. Applies to both user inputs and agent responses.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setBannedContents

Optional. List of banned phrases. Applies to both user inputs and agent responses.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getBannedContentsInUserInput

Optional. List of banned phrases. Applies only to user inputs.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setBannedContentsInUserInput

Optional. List of banned phrases. Applies only to user inputs.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getBannedContentsInAgentResponse

Optional. List of banned phrases. Applies only to agent responses.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setBannedContentsInAgentResponse

Optional. List of banned phrases. Applies only to agent responses.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getMatchType

Required. Match type for the content filter.

Returns
Type Description
int Enum of type MatchType.

setMatchType

Required. Match type for the content filter.

Parameter
Name Description
var int

Enum of type MatchType.

Returns
Type Description
$this

getDisregardDiacritics

Optional. If true, diacritics are ignored during matching.

Returns
Type Description
bool

setDisregardDiacritics

Optional. If true, diacritics are ignored during matching.

Parameter
Name Description
var bool
Returns
Type Description
$this