# Class LlmPromptSecurity (0.7.0)

0.7.0 (latest) 0.6.0 0.5.0 0.4.0 0.3.0

    LlmPromptSecurity(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Guardrail that blocks the conversation if the input is
considered unsafe based on the LLM classification.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `default_settings` | `https://docs.cloud.google.com/python/docs/reference/google-cloud-ces/latest/google.cloud.ces_v1.types.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. This field is a member of `oneof`_ `security_config`. |
| `custom_policy` | `https://docs.cloud.google.com/python/docs/reference/google-cloud-ces/latest/google.cloud.ces_v1.types.Guardrail.LlmPolicy` Optional. Use a user-defined LlmPolicy to configure the security guardrail. This field is a member of `oneof`_ `security_config`. |
| `fail_open` | `bool` 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. |

## Classes

### DefaultSecuritySettings

    DefaultSecuritySettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Configuration for default system security settings.