Reference documentation and code samples for the Google Cloud Ces V1 Client class Guardrail.
Guardrail contains a list of checks and balances to keep the agents safe and secure.
Generated from protobuf message google.cloud.ces.v1.Guardrail
Namespace
Google \ Cloud \ Ces \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ content_filter
Guardrail\ContentFilter
Optional. Guardrail that bans certain content from being used in the conversation.
↳ llm_prompt_security
Guardrail\LlmPromptSecurity
Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.
↳ llm_policy
Guardrail\LlmPolicy
Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.
↳ model_safety
Guardrail\ModelSafety
Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.
↳ code_callback
Guardrail\CodeCallback
Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.
↳ name
string
Identifier. The unique identifier of the guardrail. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}
↳ display_name
string
Required. Display name of the guardrail.
↳ description
string
Optional. Description of the guardrail.
↳ enabled
bool
Optional. Whether the guardrail is enabled.
↳ action
↳ create_time
↳ update_time
↳ etag
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.
getContentFilter
Optional. Guardrail that bans certain content from being used in the conversation.
hasContentFilter
setContentFilter
Optional. Guardrail that bans certain content from being used in the conversation.
$this
getLlmPromptSecurity
Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.
hasLlmPromptSecurity
setLlmPromptSecurity
Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.
$this
getLlmPolicy
Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.
hasLlmPolicy
setLlmPolicy
Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.
$this
getModelSafety
Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.
hasModelSafety
setModelSafety
Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.
$this
getCodeCallback
Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.
hasCodeCallback
setCodeCallback
Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.
$this
getName
Identifier. The unique identifier of the guardrail.
Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}
string
setName
Identifier. The unique identifier of the guardrail.
Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}
var
string
$this
getDisplayName
Required. Display name of the guardrail.
string
setDisplayName
Required. Display name of the guardrail.
var
string
$this
getDescription
Optional. Description of the guardrail.
string
setDescription
Optional. Description of the guardrail.
var
string
$this
getEnabled
Optional. Whether the guardrail is enabled.
bool
setEnabled
Optional. Whether the guardrail is enabled.
var
bool
$this
getAction
Optional. Action to take when the guardrail is triggered.
hasAction
clearAction
setAction
Optional. Action to take when the guardrail is triggered.
$this
getCreateTime
Output only. Timestamp when the guardrail was created.
hasCreateTime
clearCreateTime
setCreateTime
Output only. Timestamp when the guardrail was created.
$this
getUpdateTime
Output only. Timestamp when the guardrail was last updated.
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. Timestamp when the guardrail was last updated.
$this
getEtag
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
setEtag
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.
var
string
$this
getGuardrailType
string

