Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1AssistantCustomerPolicyModelArmorConfig

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

Overview

Configuration for customer defined Model Armor templates to be used for sanitizing user prompts and assistant responses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1AssistantCustomerPolicyModelArmorConfig

Returns a new instance of GoogleCloudDiscoveryengineV1AssistantCustomerPolicyModelArmorConfig.



1251
1252
1253
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 1251

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

Instance Attribute Details

#failure_modeString

Optional. Defines the failure mode for Model Armor sanitization. Corresponds to the JSON property failureMode

Returns:

  • (String)


1233
1234
1235
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 1233

def failure_mode
  @failure_mode
end

#response_templateString

Optional. The resource name of the Model Armor template for sanitizing assistant responses. Format: projects/project/locations/location/ templates/template_id`If not specified, no sanitization will be applied to the assistant response. Corresponds to the JSON propertyresponseTemplate`

Returns:

  • (String)


1241
1242
1243
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 1241

def response_template
  @response_template
end

#user_prompt_templateString

Optional. The resource name of the Model Armor template for sanitizing user prompts. Format: projects/project/locations/location/templates/ template_id`If not specified, no sanitization will be applied to the user prompt. Corresponds to the JSON propertyuserPromptTemplate`

Returns:

  • (String)


1249
1250
1251
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 1249

def user_prompt_template
  @user_prompt_template
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1256
1257
1258
1259
1260
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 1256

def update!(**args)
  @failure_mode = args[:failure_mode] if args.key?(:failure_mode)
  @response_template = args[:response_template] if args.key?(:response_template)
  @user_prompt_template = args[:user_prompt_template] if args.key?(:user_prompt_template)
end