Reference documentation and code samples for the Gemini Enterprise for Customer Experience V1 API class Google::Cloud::Ces::V1::Guardrail::LlmPromptSecurity.
Guardrail that blocks the conversation if the input is considered unsafe based on the LLM classification.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#custom_policy
def custom_policy() -> ::Google::Cloud::Ces::V1::Guardrail::LlmPolicy-
(::Google::Cloud::Ces::V1::Guardrail::LlmPolicy) — Optional. Use a user-defined LlmPolicy to configure the security
guardrail.
Note: The following fields are mutually exclusive:
custom_policy,default_settings. If a field in that set is populated, all other fields in the set will automatically be cleared.
#custom_policy=
def custom_policy=(value) -> ::Google::Cloud::Ces::V1::Guardrail::LlmPolicy-
value (::Google::Cloud::Ces::V1::Guardrail::LlmPolicy) — Optional. Use a user-defined LlmPolicy to configure the security
guardrail.
Note: The following fields are mutually exclusive:
custom_policy,default_settings. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Ces::V1::Guardrail::LlmPolicy) — Optional. Use a user-defined LlmPolicy to configure the security
guardrail.
Note: The following fields are mutually exclusive:
custom_policy,default_settings. If a field in that set is populated, all other fields in the set will automatically be cleared.
#default_settings
def default_settings() -> ::Google::Cloud::Ces::V1::Guardrail::LlmPromptSecurity::DefaultSecuritySettings-
(::Google::Cloud::Ces::V1::Guardrail::LlmPromptSecurity::DefaultSecuritySettings) — Optional. Use the system's predefined default security settings.
To select this mode, include an empty 'default_settings' message
in the request. The 'default_prompt_template' field within
will be populated by the server in the response.
Note: The following fields are mutually exclusive:
default_settings,custom_policy. If a field in that set is populated, all other fields in the set will automatically be cleared.
#default_settings=
def default_settings=(value) -> ::Google::Cloud::Ces::V1::Guardrail::LlmPromptSecurity::DefaultSecuritySettings-
value (::Google::Cloud::Ces::V1::Guardrail::LlmPromptSecurity::DefaultSecuritySettings) — Optional. Use the system's predefined default security settings.
To select this mode, include an empty 'default_settings' message
in the request. The 'default_prompt_template' field within
will be populated by the server in the response.
Note: The following fields are mutually exclusive:
default_settings,custom_policy. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Ces::V1::Guardrail::LlmPromptSecurity::DefaultSecuritySettings) — Optional. Use the system's predefined default security settings.
To select this mode, include an empty 'default_settings' message
in the request. The 'default_prompt_template' field within
will be populated by the server in the response.
Note: The following fields are mutually exclusive:
default_settings,custom_policy. If a field in that set is populated, all other fields in the set will automatically be cleared.
#fail_open
def fail_open() -> ::Boolean-
(::Boolean) — 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.
#fail_open=
def fail_open=(value) -> ::Boolean-
value (::Boolean) — 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.
-
(::Boolean) — 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.