Class: Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3SafetySettings

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v3/classes.rb,
lib/google/apis/dialogflow_v3/representations.rb,
lib/google/apis/dialogflow_v3/representations.rb

Overview

Settings for Generative Safety.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3SafetySettings

Returns a new instance of GoogleCloudDialogflowCxV3SafetySettings.



8197
8198
8199
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 8197

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#banned_phrasesArray<Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3SafetySettingsPhrase>

Banned phrases for generated text. Corresponds to the JSON property bannedPhrases



8175
8176
8177
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 8175

def banned_phrases
  @banned_phrases
end

#default_banned_phrase_match_strategyString

Optional. Default phrase match strategy for banned phrases. Corresponds to the JSON property defaultBannedPhraseMatchStrategy

Returns:

  • (String)


8180
8181
8182
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 8180

def default_banned_phrase_match_strategy
  @default_banned_phrase_match_strategy
end

#default_rai_settingsGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3SafetySettingsRaiSettings

Settings for Responsible AI. Corresponds to the JSON property defaultRaiSettings



8185
8186
8187
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 8185

def default_rai_settings
  @default_rai_settings
end

#prompt_security_settingsGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3SafetySettingsPromptSecuritySettings

Settings for prompt security checks. Corresponds to the JSON property promptSecuritySettings



8190
8191
8192
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 8190

def prompt_security_settings
  @prompt_security_settings
end

#rai_settingsGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3SafetySettingsRaiSettings

Settings for Responsible AI. Corresponds to the JSON property raiSettings



8195
8196
8197
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 8195

def rai_settings
  @rai_settings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8202
8203
8204
8205
8206
8207
8208
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 8202

def update!(**args)
  @banned_phrases = args[:banned_phrases] if args.key?(:banned_phrases)
  @default_banned_phrase_match_strategy = args[:default_banned_phrase_match_strategy] if args.key?(:default_banned_phrase_match_strategy)
  @default_rai_settings = args[:default_rai_settings] if args.key?(:default_rai_settings)
  @prompt_security_settings = args[:prompt_security_settings] if args.key?(:prompt_security_settings)
  @rai_settings = args[:rai_settings] if args.key?(:rai_settings)
end