Gemini Enterprise for Customer Experience V1BETA API - Class Google::Cloud::Ces::V1beta::Guardrail::LlmPromptSecurity (v0.1.0)

Reference documentation and code samples for the Gemini Enterprise for Customer Experience V1BETA API class Google::Cloud::Ces::V1beta::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::V1beta::Guardrail::LlmPolicy
Returns
  • (::Google::Cloud::Ces::V1beta::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::V1beta::Guardrail::LlmPolicy
Parameter
  • value (::Google::Cloud::Ces::V1beta::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.

Returns
  • (::Google::Cloud::Ces::V1beta::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::V1beta::Guardrail::LlmPromptSecurity::DefaultSecuritySettings
Returns
  • (::Google::Cloud::Ces::V1beta::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::V1beta::Guardrail::LlmPromptSecurity::DefaultSecuritySettings
Parameter
  • value (::Google::Cloud::Ces::V1beta::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.

Returns
  • (::Google::Cloud::Ces::V1beta::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
Returns
  • (::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
Parameter
  • 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.

Returns
  • (::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.