Reference documentation and code samples for the Google Cloud Model Armor V1beta Client class TemplateMetadata.
Message describing TemplateMetadata
Generated from protobuf message google.cloud.modelarmor.v1beta.Template.TemplateMetadata
Namespace
Google \ Cloud \ ModelArmor \ V1beta \ 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. |
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 |
setEnforcementType
Optional. Enforcement type for Model Armor filters.
Parameter | |
---|---|
Name | Description |
var |
int
|
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 |