Reference documentation and code samples for the Google Cloud Model Armor V1beta Client class MultiLanguageDetectionMetadata.
Message for Enabling Multi Language Detection.
Generated from protobuf message google.cloud.modelarmor.v1beta.MultiLanguageDetectionMetadata
Namespace
Google \ Cloud \ ModelArmor \ V1betaMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ source_language |
string
Optional. Optional Source language of the user prompt. If multi-language detection is enabled and this field is not set, the source language will be automatically detected. When a source language is provided, Model Armor uses it to sanitize the input. In that case the system does not perform auto-detection and relies solely on the specified language. This string field accepts a language code from the ISO-639 standard. For a list of languages supported by Model Armor, see Model Armor supported languages. For a comprehensive list of language codes, see ISO-639. |
↳ enable_multi_language_detection |
bool
Optional. Enable detection of multi-language prompts and responses. |
getSourceLanguage
Optional. Optional Source language of the user prompt.
If multi-language detection is enabled and this field is not set, the source language will be automatically detected. When a source language is provided, Model Armor uses it to sanitize the input. In that case the system does not perform auto-detection and relies solely on the specified language. This string field accepts a language code from the ISO-639 standard. For a list of languages supported by Model Armor, see Model Armor supported languages. For a comprehensive list of language codes, see ISO-639.
| Returns | |
|---|---|
| Type | Description |
string |
|
setSourceLanguage
Optional. Optional Source language of the user prompt.
If multi-language detection is enabled and this field is not set, the source language will be automatically detected. When a source language is provided, Model Armor uses it to sanitize the input. In that case the system does not perform auto-detection and relies solely on the specified language. This string field accepts a language code from the ISO-639 standard. For a list of languages supported by Model Armor, see Model Armor supported languages. For a comprehensive list of language codes, see ISO-639.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEnableMultiLanguageDetection
Optional. Enable detection of multi-language prompts and responses.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setEnableMultiLanguageDetection
Optional. Enable detection of multi-language prompts and responses.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|