Class LlmPromptSecurity (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 google.cloud.ces_v1beta.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 google.cloud.ces_v1beta.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.