Reference documentation and code samples for the Google Cloud Model Armor V1 Client class TemplateMetadata.
Message describing TemplateMetadata
Generated from protobuf message google.cloud.modelarmor.v1.Template.TemplateMetadata
Namespace
Google \ Cloud \ ModelArmor \ V1 \ TemplateMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ ignore_partial_invocation_failures |
bool
Optional. If true, partial detector failures should be ignored. |
↳ custom_prompt_safety_error_code |
int
Optional. Indicates the custom error code set by the user to be returned to the end user by the service extension if the prompt trips Model Armor filters. |
↳ custom_prompt_safety_error_message |
string
Optional. Indicates the custom error message set by the user to be returned to the end user if the prompt trips Model Armor filters. |
↳ custom_llm_response_safety_error_code |
int
Optional. Indicates the custom error code set by the user to be returned to the end user if the LLM response trips Model Armor filters. |
↳ custom_llm_response_safety_error_message |
string
Optional. Indicates the custom error message set by the user to be returned to the end user if the LLM response trips Model Armor filters. |
↳ log_template_operations |
bool
Optional. If true, log template crud operations. |
↳ log_sanitize_operations |
bool
Optional. If true, log sanitize operations. |
↳ enforcement_type |
int
Optional. Enforcement type for Model Armor filters. |
↳ multi_language_detection |
TemplateMetadata\MultiLanguageDetection
Optional. Metadata for multi language detection. |
↳ filter_version_selector |
Google\Cloud\ModelArmor\V1\FilterVersionSelector
Optional. Specifies the configuration for the Filter version to be used. If this field is populated, it takes precedence over any values set in the deprecated |
↳ modalities |
int[]
Optional. Specifies the modalities to scan. If not specified or empty, only text modality will be scanned. |
↳ data_residency_compliant |
bool
Optional. Indicates whether the template is subject to data residency compliance. If true (default for new templates), the template is subject to data residency compliance. If false, the template bypasses data residency compliance checks. |
getIgnorePartialInvocationFailures
Optional. If true, partial detector failures should be ignored.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setIgnorePartialInvocationFailures
Optional. If true, partial detector failures should be ignored.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCustomPromptSafetyErrorCode
Optional. Indicates the custom error code set by the user to be returned to the end user by the service extension if the prompt trips Model Armor filters.
| Returns | |
|---|---|
| Type | Description |
int |
|
setCustomPromptSafetyErrorCode
Optional. Indicates the custom error code set by the user to be returned to the end user by the service extension if the prompt trips Model Armor filters.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCustomPromptSafetyErrorMessage
Optional. Indicates the custom error message set by the user to be returned to the end user if the prompt trips Model Armor filters.
| Returns | |
|---|---|
| Type | Description |
string |
|
setCustomPromptSafetyErrorMessage
Optional. Indicates the custom error message set by the user to be returned to the end user if the prompt trips Model Armor filters.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCustomLlmResponseSafetyErrorCode
Optional. Indicates the custom error code set by the user to be returned to the end user if the LLM response trips Model Armor filters.
| Returns | |
|---|---|
| Type | Description |
int |
|
setCustomLlmResponseSafetyErrorCode
Optional. Indicates the custom error code set by the user to be returned to the end user if the LLM response trips Model Armor filters.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCustomLlmResponseSafetyErrorMessage
Optional. Indicates the custom error message set by the user to be returned to the end user if the LLM response trips Model Armor filters.
| Returns | |
|---|---|
| Type | Description |
string |
|
setCustomLlmResponseSafetyErrorMessage
Optional. Indicates the custom error message set by the user to be returned to the end user if the LLM response trips Model Armor filters.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getLogTemplateOperations
Optional. If true, log template crud operations.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setLogTemplateOperations
Optional. If true, log template crud operations.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getLogSanitizeOperations
Optional. If true, log sanitize operations.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setLogSanitizeOperations
Optional. If true, log sanitize operations.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEnforcementType
Optional. Enforcement type for Model Armor filters.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type EnforcementType. |
setEnforcementType
Optional. Enforcement type for Model Armor filters.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type EnforcementType. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMultiLanguageDetection
Optional. Metadata for multi language detection.
| Returns | |
|---|---|
| Type | Description |
TemplateMetadata\MultiLanguageDetection|null |
|
hasMultiLanguageDetection
clearMultiLanguageDetection
setMultiLanguageDetection
Optional. Metadata for multi language detection.
| Parameter | |
|---|---|
| Name | Description |
var |
TemplateMetadata\MultiLanguageDetection
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getFilterVersionSelector
Optional. Specifies the configuration for the Filter version to be used.
If this field is populated, it takes precedence over any values set in
the deprecated filter_version fields within RaiFilterSettings,
PiAndJailbreakFilterSettings.
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\ModelArmor\V1\FilterVersionSelector|null |
|
hasFilterVersionSelector
clearFilterVersionSelector
setFilterVersionSelector
Optional. Specifies the configuration for the Filter version to be used.
If this field is populated, it takes precedence over any values set in
the deprecated filter_version fields within RaiFilterSettings,
PiAndJailbreakFilterSettings.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Cloud\ModelArmor\V1\FilterVersionSelector
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getModalities
Optional. Specifies the modalities to scan.
If not specified or empty, only text modality will be scanned.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<int> |
|
setModalities
Optional. Specifies the modalities to scan.
If not specified or empty, only text modality will be scanned.
| Parameter | |
|---|---|
| Name | Description |
var |
int[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDataResidencyCompliant
Optional. Indicates whether the template is subject to data residency compliance. If true (default for new templates), the template is subject to data residency compliance. If false, the template bypasses data residency compliance checks.
| Returns | |
|---|---|
| Type | Description |
bool |
|
hasDataResidencyCompliant
clearDataResidencyCompliant
setDataResidencyCompliant
Optional. Indicates whether the template is subject to data residency compliance. If true (default for new templates), the template is subject to data residency compliance. If false, the template bypasses data residency compliance checks.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|