Class: Google::Apis::CesV1::GuardrailLlmPromptSecurity
- Inherits:
-
Object
- Object
- Google::Apis::CesV1::GuardrailLlmPromptSecurity
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb
Overview
Guardrail that blocks the conversation if the input is considered unsafe based on the LLM classification.
Instance Attribute Summary collapse
-
#custom_policy ⇒ Google::Apis::CesV1::GuardrailLlmPolicy
Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.
-
#default_settings ⇒ Google::Apis::CesV1::GuardrailLlmPromptSecurityDefaultSecuritySettings
Configuration for default system security settings.
-
#fail_open ⇒ Boolean
(also: #fail_open?)
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GuardrailLlmPromptSecurity
constructor
A new instance of GuardrailLlmPromptSecurity.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GuardrailLlmPromptSecurity
Returns a new instance of GuardrailLlmPromptSecurity.
3895 3896 3897 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3895 def initialize(**args) update!(**args) end |
Instance Attribute Details
#custom_policy ⇒ Google::Apis::CesV1::GuardrailLlmPolicy
Guardrail that blocks the conversation if the LLM response is considered
violating the policy based on the LLM classification.
Corresponds to the JSON property customPolicy
3879 3880 3881 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3879 def custom_policy @custom_policy end |
#default_settings ⇒ Google::Apis::CesV1::GuardrailLlmPromptSecurityDefaultSecuritySettings
Configuration for default system security settings.
Corresponds to the JSON property defaultSettings
3884 3885 3886 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3884 def default_settings @default_settings end |
#fail_open ⇒ Boolean Also known as: fail_open?
Optional. Determines the behavior when the guardrail encounters an LLM error. -
If true: the guardrail is bypassed. - If false (default): the guardrail
triggers/blocks. Note: If a custom policy is provided, this field is ignored
in favor of the policy's 'fail_open' configuration.
Corresponds to the JSON property failOpen
3892 3893 3894 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3892 def fail_open @fail_open end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3900 3901 3902 3903 3904 |
# File 'lib/google/apis/ces_v1/classes.rb', line 3900 def update!(**args) @custom_policy = args[:custom_policy] if args.key?(:custom_policy) @default_settings = args[:default_settings] if args.key?(:default_settings) @fail_open = args[:fail_open] if args.key?(:fail_open) end |