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

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
Returns

#action=

def action=(value) -> ::Google::Cloud::Ces::V1beta::TriggerAction
Parameter
Returns

#code_callback

def code_callback() -> ::Google::Cloud::Ces::V1beta::Guardrail::CodeCallback
Returns
  • (::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
Parameter
  • 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.

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

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

#description

def description() -> ::String
Returns
  • (::String) — Optional. Description of the guardrail.

#description=

def description=(value) -> ::String
Parameter
  • value (::String) — Optional. Description of the guardrail.
Returns
  • (::String) — Optional. Description of the guardrail.

#display_name

def display_name() -> ::String
Returns
  • (::String) — Required. Display name of the guardrail.

#display_name=

def display_name=(value) -> ::String
Parameter
  • value (::String) — Required. Display name of the guardrail.
Returns
  • (::String) — Required. Display name of the guardrail.

#enabled

def enabled() -> ::Boolean
Returns
  • (::Boolean) — Optional. Whether the guardrail is enabled.

#enabled=

def enabled=(value) -> ::Boolean
Parameter
  • value (::Boolean) — Optional. Whether the guardrail is enabled.
Returns
  • (::Boolean) — Optional. Whether the guardrail is enabled.

#etag

def etag() -> ::String
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns
  • (::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
Parameter
  • 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.

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

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

Returns
  • (::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
Returns
  • (::String) — Identifier. The unique identifier of the guardrail. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}

#name=

def name=(value) -> ::String
Parameter
  • value (::String) — Identifier. The unique identifier of the guardrail. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}
Returns
  • (::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
Returns