Reference documentation and code samples for the Gemini Enterprise for Customer Experience V1BETA API class Google::Cloud::Ces::V1beta::Guardrail.
Guardrail contains a list of checks and balances to keep the agents safe and secure.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#action
def action() -> ::Google::Cloud::Ces::V1beta::TriggerAction- (::Google::Cloud::Ces::V1beta::TriggerAction) — Optional. Action to take when the guardrail is triggered.
#action=
def action=(value) -> ::Google::Cloud::Ces::V1beta::TriggerAction- value (::Google::Cloud::Ces::V1beta::TriggerAction) — Optional. Action to take when the guardrail is triggered.
- (::Google::Cloud::Ces::V1beta::TriggerAction) — Optional. Action to take when the guardrail is triggered.
#code_callback
def code_callback() -> ::Google::Cloud::Ces::V1beta::Guardrail::CodeCallback-
(::Google::Cloud::Ces::V1beta::Guardrail::CodeCallback) — Optional. Guardrail that potentially blocks the conversation based on the
result of the callback execution.
Note: The following fields are mutually exclusive:
code_callback,content_filter,llm_prompt_security,llm_policy,model_safety. If a field in that set is populated, all other fields in the set will automatically be cleared.
#code_callback=
def code_callback=(value) -> ::Google::Cloud::Ces::V1beta::Guardrail::CodeCallback-
value (::Google::Cloud::Ces::V1beta::Guardrail::CodeCallback) — Optional. Guardrail that potentially blocks the conversation based on the
result of the callback execution.
Note: The following fields are mutually exclusive:
code_callback,content_filter,llm_prompt_security,llm_policy,model_safety. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Ces::V1beta::Guardrail::CodeCallback) — Optional. Guardrail that potentially blocks the conversation based on the
result of the callback execution.
Note: The following fields are mutually exclusive:
code_callback,content_filter,llm_prompt_security,llm_policy,model_safety. If a field in that set is populated, all other fields in the set will automatically be cleared.
#content_filter
def content_filter() -> ::Google::Cloud::Ces::V1beta::Guardrail::ContentFilter-
(::Google::Cloud::Ces::V1beta::Guardrail::ContentFilter) — Optional. Guardrail that bans certain content from being used in the
conversation.
Note: The following fields are mutually exclusive:
content_filter,llm_prompt_security,llm_policy,model_safety,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
#content_filter=
def content_filter=(value) -> ::Google::Cloud::Ces::V1beta::Guardrail::ContentFilter-
value (::Google::Cloud::Ces::V1beta::Guardrail::ContentFilter) — Optional. Guardrail that bans certain content from being used in the
conversation.
Note: The following fields are mutually exclusive:
content_filter,llm_prompt_security,llm_policy,model_safety,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Ces::V1beta::Guardrail::ContentFilter) — Optional. Guardrail that bans certain content from being used in the
conversation.
Note: The following fields are mutually exclusive:
content_filter,llm_prompt_security,llm_policy,model_safety,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
#create_time
def create_time() -> ::Google::Protobuf::Timestamp- (::Google::Protobuf::Timestamp) — Output only. Timestamp when the guardrail was created.
#description
def description() -> ::String- (::String) — Optional. Description of the guardrail.
#description=
def description=(value) -> ::String- value (::String) — Optional. Description of the guardrail.
- (::String) — Optional. Description of the guardrail.
#display_name
def display_name() -> ::String- (::String) — Required. Display name of the guardrail.
#display_name=
def display_name=(value) -> ::String- value (::String) — Required. Display name of the guardrail.
- (::String) — Required. Display name of the guardrail.
#enabled
def enabled() -> ::Boolean- (::Boolean) — Optional. Whether the guardrail is enabled.
#enabled=
def enabled=(value) -> ::Boolean- value (::Boolean) — Optional. Whether the guardrail is enabled.
- (::Boolean) — Optional. Whether the guardrail is enabled.
#etag
def etag() -> ::String- (::String) — Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
#etag=
def etag=(value) -> ::String- value (::String) — Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- (::String) — Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
#llm_policy
def llm_policy() -> ::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy-
(::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy) — Optional. Guardrail that blocks the conversation if the LLM response is
considered violating the policy based on the LLM classification.
Note: The following fields are mutually exclusive:
llm_policy,content_filter,llm_prompt_security,model_safety,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
#llm_policy=
def llm_policy=(value) -> ::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy-
value (::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy) — Optional. Guardrail that blocks the conversation if the LLM response is
considered violating the policy based on the LLM classification.
Note: The following fields are mutually exclusive:
llm_policy,content_filter,llm_prompt_security,model_safety,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Ces::V1beta::Guardrail::LlmPolicy) — Optional. Guardrail that blocks the conversation if the LLM response is
considered violating the policy based on the LLM classification.
Note: The following fields are mutually exclusive:
llm_policy,content_filter,llm_prompt_security,model_safety,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
#llm_prompt_security
def llm_prompt_security() -> ::Google::Cloud::Ces::V1beta::Guardrail::LlmPromptSecurity-
(::Google::Cloud::Ces::V1beta::Guardrail::LlmPromptSecurity) — Optional. Guardrail that blocks the conversation if the prompt is
considered unsafe based on the LLM classification.
Note: The following fields are mutually exclusive:
llm_prompt_security,content_filter,llm_policy,model_safety,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
#llm_prompt_security=
def llm_prompt_security=(value) -> ::Google::Cloud::Ces::V1beta::Guardrail::LlmPromptSecurity-
value (::Google::Cloud::Ces::V1beta::Guardrail::LlmPromptSecurity) — Optional. Guardrail that blocks the conversation if the prompt is
considered unsafe based on the LLM classification.
Note: The following fields are mutually exclusive:
llm_prompt_security,content_filter,llm_policy,model_safety,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Ces::V1beta::Guardrail::LlmPromptSecurity) — Optional. Guardrail that blocks the conversation if the prompt is
considered unsafe based on the LLM classification.
Note: The following fields are mutually exclusive:
llm_prompt_security,content_filter,llm_policy,model_safety,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
#model_safety
def model_safety() -> ::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety-
(::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety) — Optional. Guardrail that blocks the conversation if the LLM response is
considered unsafe based on the model safety settings.
Note: The following fields are mutually exclusive:
model_safety,content_filter,llm_prompt_security,llm_policy,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
#model_safety=
def model_safety=(value) -> ::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety-
value (::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety) — Optional. Guardrail that blocks the conversation if the LLM response is
considered unsafe based on the model safety settings.
Note: The following fields are mutually exclusive:
model_safety,content_filter,llm_prompt_security,llm_policy,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
-
(::Google::Cloud::Ces::V1beta::Guardrail::ModelSafety) — Optional. Guardrail that blocks the conversation if the LLM response is
considered unsafe based on the model safety settings.
Note: The following fields are mutually exclusive:
model_safety,content_filter,llm_prompt_security,llm_policy,code_callback. If a field in that set is populated, all other fields in the set will automatically be cleared.
#name
def name() -> ::String-
(::String) — Identifier. The unique identifier of the guardrail.
Format:
projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}
#name=
def name=(value) -> ::String-
value (::String) — Identifier. The unique identifier of the guardrail.
Format:
projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}
-
(::String) — Identifier. The unique identifier of the guardrail.
Format:
projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}
#update_time
def update_time() -> ::Google::Protobuf::Timestamp- (::Google::Protobuf::Timestamp) — Output only. Timestamp when the guardrail was last updated.